Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I want to find all regex matches within a string. The problem is that sometimes parts of one match are parts of another and I think this is throwing things off. Example:
The code above finds only 1 match when there are actually 2 matches within the string. Perl grabs the first match "x\nxxT" and then I think it starts looking for a new match where that last one ended. What I'd like to do is also get the other match - "xTxxT". Is there any way to get Perl to check the entire string for each greedy regex pass excluding any previously found patterns? In reply to Regex Greed by temporal
|
|