I have a string A and want to test if another string B is not part of it. This is a very simple regex whose result can be inverted afterwards.
I could do:
If what you're searching for really isn't more complicated than a simple string like "foobar":
if (yourString.indexOf("foobar") === -1) { // ... }
http://www.w3schools.com/jsref/jsref_indexOf.asp