![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Problem with capturing all matches with regexby duelafn (Vicar) |
on Oct 12, 2016 at 15:11 UTC ( #1173856=note: print w/replies, xml ) | Need Help?? |
I was hoping that the named-capture variables would collect all of your matches, but they also only keep the last one, so as an alternative, I can only suggest embedded code (the (?:...)++ ensures no backtracking over your push @lhs code):
This approach also allows you to construct something more interesting than a flat list, should that be desirable. Good Day,
In Section
Seekers of Perl Wisdom
|
|