in reply to How do I find $a only where it's not followed by $b and then replace it with $c?
Use Perl's cool
"zero-width negative lookahead assertion".
s/$a(?!$b)/$c/;
In Section
Seekers of Perl Wisdom
in reply to How do I find $a only where it's not followed by $b and then replace it with $c?
s/$a(?!$b)/$c/;