How can I replace double backslashes “\\” within the given string after the word, content, with only a single backslash, \?
var a = "blah blah \\ \\ content:\"whiskey \\\\";
so that it shows up as:
var a = "blah blah \\ \\ content:\"whiskey \\";
I tried the following without success.
a.replace(/content:*\\\\\"/g, "\\"));
Rather than trying to tackle the entire problem with a regular expression, I’d just break the string on “content” and do replacement on right half.