title: Split string into array on first non-numeric character in javascript
body: <p>I want to split a string into an array containing all leading digits as one value and the rest of the string as the second value:</p>
  
  <pre><code>3px -&gt; Array('3','px')
  01b -&gt; Array('01','b')
  01 -&gt; Array('01','')
  b -&gt; Array('','b')
  1.5 -&gt; Array('1','.5')
  300,5 -&gt; Array('300',',5')
  a1 -&gt; Array('','a1')
  </code></pre>
  
  <p>In PHP you could do something like:</p>
  
  <pre><code>$matches = array();
  preg_match('/([0-9]+)([^0-9]+)/',$value,$matches);
  </code></pre>