I\'m running into an issue that I think is being caused by needing to double-up on some single quotes inside a string. However, JS\'s string.replace uses RegEx, and I\'ve ne
You don't need to use RegExp.
String patterm version:
str.replace("'", "''", 'g')
RegExp pattern version:
str.replace(/'/g, "''")
Here you have some useful RegExp links: