Javascript match part of url, if statement based on result
<p>Here is an example of the url i'm trying to match: <a href="http://store.mywebsite.com/folder-1/folder-2/item3423434.aspx" rel="nofollow">http://store.mywebsite.com/folder-1/folder-2/item3423434.aspx</a></p>

<p>What im trying to match is http: //store.mywebsite.com/folder-1 except that "folder-1" will always be a different value. I can't figure out how to write an if statement for this:</p>

<p>Example (pseudo-code)</p>

<pre><code>if(url contains http://store.mywebsite.com/folder-1)
do this

else if (url contains http://store.mywebsite.com/folder-2)
do something else
</code></pre>

<p>etc</p>
