My guess is that it's a little slow, though. I'd reverse $string first, myself.my $string = "AAbfwercB(A)fjklASZaB(A)xvASABAB(A)gfdaZAA"; my @chunks = split(/B\(A\)/, $_); $_ =~ tr/A/Z/ foreach @chunks; $string = join 'B(A)', @chunks;
In reply to Re: look behind in REs
by chromatic
in thread look behind in REs
by tepas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |