title: Remove all special characters with RegExp
body: <p>I would like a RegExp that will remove all special characters from a string. I am trying something like this but it doesn’t work in IE7, though it works in Firefox.</p>
  
  <pre><code>var specialChars = "!@#$^&amp;%*()+=-[]\/{}|:&lt;&gt;?,.";
  
  for (var i = 0; i &lt; specialChars.length; i++) {
    stringToReplace = stringToReplace.replace(new RegExp("\\" + specialChars[i], "gi"), "");
  }
  </code></pre>
  
  <p>A detailed description of the RegExp would be helpful as well.</p>