Perl: the Markov chain saw | |
PerlMonks |
Re^3: brackets matching problemby hanenkamp (Pilgrim) |
on Aug 19, 2004 at 11:56 UTC ( [id://384263]=note: print w/replies, xml ) | Need Help?? |
Greedy matching applies to the closures, not to alternatives. Besides, in this case, whether 12 matches or 1 then 2, it's the same length, is it not? From perlre, "alternatives are not necessarily greedy." You can make your matches greedy by arranging them how you like.
In Section
Seekers of Perl Wisdom
|
|