title: Javascript and backslashes replace
body: <p>here is my string:</p>
  
  <pre><code>var str = "This is my \string";
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>var replaced = str.replace("/\\/", "\\\\");
  </code></pre>
  
  <p>I can't get my output to be: </p>
  
  <pre><code>"This is my \\string"
  </code></pre>
  
  <p>I have tried every combination I can think of for the regular expression and the replacement value.</p>
  
  <p>Any help is appreciated!</p>