Match returning null in JavaScript
<pre><code>var regEx = new RegExp("/[0-9]/");
var test = 'TREE'
alert(test.match(regEx));
</code></pre>

<p>or</p>

<pre><code>var regEx = new RegExp("/[0-9]/");
var test = '1234'
alert(test.match(regEx));
</code></pre>

<p>Why do they return null?</p>

<p>Am i missing something here?</p>

<p>(Ok, the debate mentally drained me last night)</p>
