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&
var str = '"Hello, Tim"\n\ \n\ Land of the free, and home of the brave'; str .split('"') .map(function(v,i){ return i%2===0 ? v : v.replace(',',','); }) .join('"');
Check MDC for an implementation of map() for non-supporting browsers.
map()