The look-behind pattern is probably going to help me and the code you gave seems to work for me. However, your post leads to ask me a couple of more questions since I would like to know what I am doing. I am not familiar with this syntax:

Code

s{ (?<!\@) \" [^"]* \" }{}gmsx;

Where can I find info about "gmsx"? A search on preldoc does not seem to give any results, What is the {}? The syntax you use, can this be optimized (disable backtracking, disable buffering)?

Like the double quotes string match example from perlre:

Code

/"([^"\\]+|\\.)*"/

Which according to perldoc can be most efficiently performed when written as:

Code

/"(?:[^"\\]++|\\.)*+"/

So, can my original question also be written as a optimized single regex pattern to be used in s///g?