mike mulligan writes:
:If it important to be able to do both:
:
: $large = join '|', @possible'
: $data =~ / (?<= $large) GAAC /x; # Don't care which @possible?
:
:and
:
: $data =~ m/ ($large) GAAC /x; # Need $1 to say which @possible
:
:Then perhaps a back-reference-setting look-behind could be implemented?
:Don't have an obvious syntax to use (back-tick == back-reference?), but
:something like:
:
: $data =~ m/ (?`<= $large) GAAC /x; # Need $1 to say which @possible
:
:Does this ehanced look-behind satisfy the RFC's needs?
Note that you can already get backreferences out of zero-width
assertions. Like the Tardis, it only looks zero-width from the
outside:
"test" =~ /(?<=(t))(.)/ and print $1, $2;
Hugo