more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am a seeker of perl wisdom...have worked on this for days too no avail.
I would like to take an input string e.g. "abcde" (more specifically it is like (a|b)(b|c)(c|d|e)) start at the first position "a" or (a|b) and search through another string of letters. If it finds "a", I would like the program to continue to "b" and then search with "ab". Again, if it finds the string "ab", next to try "abc" etc. until it can no longer extend the string and find a resulting match. i.e. it will find "abcd" then add onto it "e"...not find "abcde" and so print out just "abcd". I deperately hope this makes sense. Here is a snippet of my actual program to give you a basic idea of what I have done thus far... not sure what to do at this point?? Any help is greatly appreciated, New'b'ish dr_jgbn In reply to Progressive pattern matching by Anonymous Monk
|
|