The input is an absolute path for example:
/usr/local/lib/node_modules/normalize
/usr/local/lib/node_modules/bobcat/index.js
I want to create a regex that matches EVERYTHING except when "bobcat" was found in the string:
This is what I got to match everything:
var pattern = /node_modules/g;
var matches = pattern.test(input);
How can I do this?
var pattern = /bobcat/, matches = !pattern.test(input);