In JavaScript, strings are surrounded by " (or ', which this regex doesn't support) and \ is used to escape characters that would otherwise have a different meaning.
Now, [^\\\\\\\"] is a character class for characters that aren't \ or ". However because we're using a string literal to define the regular expression the " needs escaping, and because \ has a special meaning within both strings and regular expressions we need to escape them too.
\" starting characters
\\" escape `\` for regex
\\\" escape `"` for regex
\\\\\\" escape `\` for string
\\\\\\\" escape `"` for string
It's simpler if you use ' for the string, or a regex literal. The following are all the same.
new RegExp("\"(?:\\.|[^\\\\\\\"])*\"", "g");
new RegExp('"(?:\\.|[^\\\\\\"])*"', 'g');
/"(?:\.|[^\\\"])*"/g
In fact, " doesn't have a special meaning in a regular expression, so escaping it was not necessary.
/"(?:\.|[^\\"])*"/g
Also note that . isn't either \ or ", so the | construct is pointless. I would guess this is an error, and that it's intended to be \\. - i.e. a \ followed by any character. That would require four \ in the original, not two. Without this correction, the expression won't match strings like "ab\\c".
If we want to support ' as well then things are going to get very complicated, and we probably should just use a simple char-by-char parser, rather than a regular expression.
RegExp Reference
\ or "