I\'m looking in a string such as:
\"Hello, Tim\"
Land of the free, and home of the brave
And I need it to become:
\"Hello&
It is probably easier with a callback function to replace:
s = s.replace(/"[^"]*"/g, function(g0){return g0.replace(/,/g,',');});
At the first step we find all quotes, and replace just the commas in them.
You can even allow escaping quotes:
/"([^"]|"")*"/g
/"([^"\\]|\\.)*"/g