title: How do you replace backslash double quote in a string?
body: <p>How do replace backslash double quote (e.g. \") in a string?</p>
  
  <p>The code below does not work.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
      &lt;script type="text/javascript"&gt;
  
          var myVar = '\"Things You Should Know\"';
          document.write(myVar.replace(/\\\"/g, '|'));
      &lt;/script&gt;
  &lt;body&gt;
  &lt;br&gt;hello
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>