So I just read through perlre and I couldn't find something: how does one include a (code-based) conditional expression in a regex, analogous to actions in P::RD? Is it even possible? If so, then one could not only find the last match (which may differ slightly from reversing the result of a reversed regex):
but also the (say) tenth match."abcdef" =~ /(..*..*.)(?{$last = $^N})(?!)/; print "[$last]\n"; ## "[def]"
Another solution to my problem would be possible if P::RD had non-greedy matches. Is it likely that this will be implemented soon? I guess I could try hacking on it myself.
P.S.: Has anyone ever used customre? Super Search gave back only one result ...
In reply to Re^2: Regexes: finding ALL matches (including overlap)
by kaif
in thread Regexes: finding ALL matches (including overlap)
by kaif
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |