Execute function if url does not contain a string from array
<p>I'm trying run a script if URL doesn't contain specific string. Here is what i have so far:</p>

<pre><code>var ignorePages = ['page1','page2','page3'];

if (window.location.href.indexOf($.inArray(ignorePages)) === -1) {
    // do something
}
</code></pre>

<p>But this is not working. I would like to test if the string is found in array and if not, execute. Searched the SO Q/A but couldnt find a solution via array using jQuery's <code>inArray</code>.</p>