If it's inside the variable
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1789945/javascript-string-contains">JavaScript: string contains</a>  </p>
</blockquote>



<p>I have a simple question for you. I have a variable with my url. Now i want check this url. I make this javascript:</p>

<pre><code>var url = "http://www.mikevierwind.nl";

if(url == "localhost" ) {
    alert("test");
}
</code></pre>

<p>How can i make the follow thing. When mikewind is in variable. Than run it. The variable can also be mikevierwind.be and mikevierwind.eu. But the script must always than run. I must check of mikevierwind is in the variable.</p>
