in reply to Swap between first found match

If you give us a snippet of code to tell us what you've tried, and explain how it didn't work the way you expected, it will be easier for us to understand where you might be stumped.

However, I think you might be looking for something like this:

my $text = "Test of \"this first quote.\" Second quote \"ignored.\""; $text =~ s/\"(.*?)\"/\"that\"/;

Linda

Update: I responded quickly, and could/should have been much clearer. Let's try that again.

my $text = 'Test of "this first quote." Second quote "ignored."'; $text =~ s/"(.*?)"/"that"/;