cannot find the match() from <div> in JavaScript
<p>I have question in JavaScript, I'm quite new so be easy on me please :) .</p>

<p>Let's say I have this HTML code:</p>

<pre><code>&lt;body&gt;
&lt;div id="myDivId"&gt; &lt;h3&gt; &lt;p style="text-align: center;"&gt;&lt;a href="http://google.com"&gt;&lt;strong&gt;TEXT Number 453&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/h3&gt;&lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>and when I write to extract the digits only:</p>

<p><code>var x = document.getElementById("myDivId").innerHTML;</code></p>

<p><code>var patt1=/\d{3}/gi;</code></p>

<p><code>document.write(x.match(patt1));</code></p>

<p>The Output will be</p>

<p><code>NaN</code> not the number <code>453</code>, but when I remove all the attributes like (hyperlink syntax, <p> syntax, etc) it does work.</p>

<p>I know I'm doing a mistake, so I hope you enlighten me :).</p>
