- or download this
/(....)...(...)...((??{foo()}))....(...)/
^ ^ ^ ^
1 2 3 4
- or download this
use Modern::Perl;
...
my @caps = $str =~ /(a)b(c)d((??{'(.)' x 5}))e(f)/;
say join(', ', @caps);
- or download this
18:33 >perl 504_SoPW.pl
a, c, $$$$$, f
18:38 >