I\'m trying to replace the \"\'\" character with the \"\'\'\" string using the replace method, like this:
temp.replace(\"\\\'\", \"\'\'\");
but
So it's basically changing the single quote character with 2 single quote characters, right? If that's the case you might wanna use the global flag, g at the end of yoir Regular Expression and assing it back to your value (temp)
g
temp = temp.replace(/'/g,"''");