There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Not just to be contrary, but this is no place for the non-greedy quantifiers. What if the "unpredictable sequence" contains the string "consists"? On the assumption that the rest of the string is less "unpredictable", you want to match everything on this line between the first "sequence" and the last "consists". Hence my suggestion:
(If the rest of the string may be as unpredictable, I'd suggest you write a full parser instead. Looks like there's a fair chance you won't have to though.)
print "Just another Perl ${\(trickster and hacker)},"
In reply to Re: Regxp: signaling when to stop
by Sidhekin
|
|