For a negative look-behind in JavaScript, use the following −
(^|[^\\])"
To replace double quotes, you can use the following −
str.replace(/(^|[^\\])"/g, "$1'")
For a negative look-behind in JavaScript, use the following −
(^|[^\\])"
To replace double quotes, you can use the following −
str.replace(/(^|[^\\])"/g, "$1'")