title: How can I replace a backslash with a double backslash using RegExp?
body: <p>I need to modify the value using javascript, to make it ready to be put as part of a SQL insert query. </p>
  
  <p>Currently I have the following code to handle the single quote ' character. </p>
  
  <pre><code>value = value.replace(/'/g, "\\'");
  </code></pre>
  
  <p>This code works without an issue. Now I noticed that stand-alone backslashes are causing errors. </p>
  
  <p>How can I remove those stand alone backslashes?</p>