"be consistent" | |
PerlMonks |
Re: mysteries of regex substring matchingby LanX (Saint) |
on Jan 15, 2021 at 22:34 UTC ( [id://11126979]=note: print w/replies, xml ) | Need Help?? |
> So, is there a way to use capture groups to match multiple times like separate groups does in the first example? It depends what your goal is. If it's simply using a quantifier {4} the answer is no, because only the last match will be kept for the unique first group , that's why you get 01D9 at the end. Not a mystery. But there are numerous workarounds I can think of. Like
updates
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|