in reply to Re: Swap between first found match
in thread Swap between first found match

Use non-greedy match:  .*?
s/".*?"/"that"/;

Replies are listed 'Best First'.
Re: Re: Re: Swap between first found match
by pzbagel (Chaplain) on Mar 04, 2004 at 08:07 UTC

    What's wrong with a negated character class? [^"]

      Nothing wrong, just 2 more characters to type.