Javascript regexp match with exception
<p>The input is an absolute path for example:</p>

<pre><code>/usr/local/lib/node_modules/normalize
/usr/local/lib/node_modules/bobcat/index.js
</code></pre>

<p>I want to create a regex that matches EVERYTHING except when "bobcat" was found in the string:</p>

<p>This is what I got to match everything:</p>

<pre><code>var pattern = /node_modules/g;
var matches = pattern.test(input);
</code></pre>

<p>How can I do this?</p>