title: Regular expression to match anything that isn't the string "ABCD"
body: <p>How do I write a Javascript regular expression that matches everything except a given string ("ABCD")?</p>
  
  <p>Something like <code>/[^ABCD]/</code> except I don't want to match everything that isn't the letter A, B, C or D. I want to match everything that isn't the string "ABCD".</p>
  
  <p>Basically I want this to happen:</p>
  
  <pre><code>var myStr = "ABCA ABCB ABCD BCD ABC"
  myStr.replace(/!(ABCD)/g,'') // returns ABCD
  </code></pre>