title: Javascript regex to remove punctuation
body: <p>I'm having trouble with my regex. I'm sure something is not escaping properly.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function regex(str) {
    
    str = str.replace(/(~|`|!|@|#|$|%|^|&amp;|*|\(|\)|{|}|\[|\]|;|:|\"|'|&lt;|,|\.|&gt;|\?|\/|\\|\||-|_|+|=)/g,"")
    document.getElementById("innerhtml").innerHTML = str;
    
   }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="innerhtml"&gt;&lt;/div&gt;
  
  &lt;p&gt;&lt;input type="button" value="Click Me" onclick="regex('test @ . / | ) this');"&gt;</code></pre>
  </div>
  </div>
  </p>