This seems a little clunky to me. Does anyone know of a better method to get re to start from the right hand side?my $string = "abababa"; print "was [$string]\n"; $string =~ s/(b)(?!.*b)/x/; print "now [$string]\n";
In reply to RE - match from right by bangers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |