neganch => sub { my $string = "abababa"; $string =~ s/(b)(?!.*b)$/x/; return; }
That neganch test will fail if 'b' isn't the last character in the string, which it isn't.
Dave
In reply to Re^2: RE - match from right
by davido
in thread RE - match from right
by bangers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |