in reply to Re^2: regex question
in thread regex question
There are hacks, though:
$_ = "abc*def*ghi"; my @matches; m/(?: ([^*]+) (?{ push @matches, $^N}) \*?)+/x; print join('|', @matches), $/;
But before you use this, read the big fat warning in perlre about how experimental (?{ ... }) is.
|
|---|