Javascript: indexOf with Regular Expression
<p>How can I check whether the page url contains a '#' character <strong>plus some random digits</strong> </p>

<blockquote>
  <p>e.g. www.google.de/#1234</p>
</blockquote>

<pre><code>if( window.location.href.indexOf('#') &gt; 0 ){
  alert('true');
}
</code></pre>

<p>Does indexOf support Regular Expressions?</p>