http://www.perlmonks.org?node_id=2662

vroom has asked for the wisdom of the Perl Monks concerning the following question:

How do I find $a only where it's not followed by $b and then replace it with $c?

Originally posted as a Categorized Question.

  • Comment on How do I find $a only where it's not followed by $b and then replace it with $c?

Replies are listed 'Best First'.
Re: How do I find $a only where it's not followed by $b and then replace it with $c?
by neshura (Chaplain) on Feb 15, 2000 at 03:19 UTC
Re: How do I find $a only where it's not followed by $b and then replace it with $c?
by cored (Scribe) on Oct 09, 2002 at 00:41 UTC
    s/$a[^$b]/$c/;

    Originally posted as a Categorized Answer.