title: How do I replace special characters with regex in javascript?
body: <p>I need to replace special characters from a string, like this:</p>
  
  <pre><code>this.value = this.value.replace(/\n/g,'');
  </code></pre>
  
  <p>Except for the regex part, I need it to look for the <strong>opposite</strong> of all these:</p>
  
  <blockquote>
    <p>[0-9]  Find any digit from 0 to 9<br>
    [A-Z]  Find any character from uppercase A to uppercase Z<br>
    [a-z]  Find any character from lowercase a to lowercase z  </p>
  </blockquote>
  
  <p>plus <code>underscore</code> and <code>minus</code>.</p>
  
  <p>Therefore, this string is OK:</p>
  
  <blockquote>
    <p>Abc054_34-bd</p>
  </blockquote>
  
  <p>And this string is bad:</p>
  
  <blockquote>
    <p>Fš 04//4.</p>
  </blockquote>
  
  <p>From the bad string I need the disallowed characters removed.</p>
  
  <p>How do I stack this regex rule?</p>