good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: multiple matches with regexpby Aristotle (Chancellor) |
on Oct 10, 2003 at 17:42 UTC ( [id://298340]=note: print w/replies, xml ) | Need Help?? |
This only matches twice because each match continues were the previous left off. The first match consumes two a's, so you can only match once more. Many solutions are possible, but without a better idea of your requirements, most of the propositions won't fit. Do you intend to match fixed strings or are you planning to use true patterns? What does your data look like? What kinds of overlap between matches are possible? There is no universally applicable answer to your problem. Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|