Is their a negative lookbehind equivalent in JavaScript?

JavascriptObject Oriented ProgrammingFront End Technology

For a negative look-behind in JavaScript, use the following −

(^|[^\\])"

To replace double quotes, you can use the following −

str.replace(/(^|[^\\])"/g, "$1'")
raja
Published on 01-Mar-2018 06:13:56
Advertisements