![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: Regex match iterative groupingby sfink (Deacon) |
on Apr 06, 2006 at 17:10 UTC ( #541674=note: print w/replies, xml ) | Need Help?? |
Adjust the quotes for your shell:
perl -le '$_ = "abcd"; while (/(..)/g) { print $1; --pos }' Or closer to your exact question:
You might be able to do that in a list-context match with an embedded expression, but that would be too scary for me.
In Section
Seekers of Perl Wisdom
|
|