Another solution, using overlapping capture groups (uses ' single-quotes in example instead of " double-quotes because of excessive escapology needed by Windoze shell to handle doubles):
>perl -wMstrict -le "my $s = q{'ab'cde'fgh'}; my @ss = $s =~ m{ (?= (' [^']* ')) }xmsg; print qq{($_)} for @ss; " ('ab') ('cde') ('fgh')
In reply to Re: Regexp doubt
by AnomalousMonk
in thread Regexp doubt
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |