title: Regex match everything except a given substring
body: <p>I know variations of this question have been asked in the past, but none of the examples I've tried out have been effective. So, one more time, how can I match all but a given substring with regex?</p>
  
  <p>For example, select everything but <code>stupid</code> from this Einstein quote:</p>
  
  <pre><code>Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.
  </code></pre>
  
  <p>I've had some success capturing everything up to <code>stupid</code> using <code>((?!stupid).)*</code>, but no luck with getting all of it. I've been testing with <a href="https://regex101.com/" rel="nofollow">regex101.com</a></p>