title: Split a string before the first number
body: <p>I would like to split a string like this:</p>
  <pre><code>Mystreetway 123, 1.th
  </code></pre>
  <p>So that I can have the following output array:</p>
  <pre><code>0 =&gt; Mystreetway
  1 =&gt; 123, 1.th
  </code></pre>
  <p>The code must split the string before the first integer found.  The substring from the first integer to the end of the string should become the second element upon splitting</p>
  <p>I have tried the following found solution:</p>
  <pre><code>$key = &quot;Mystreetway 123, 1.th&quot;;
  $pattern = &quot;/(\d+)/&quot;;
  
  $array = preg_split($pattern, $key, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
  print_r($array);
  </code></pre>
  <p>But it returns the following:</p>
  <pre><code>[0] =&gt; Mystreetway [1] =&gt; 123 [2] =&gt; , [3] =&gt; 1 [4] =&gt; .th
  </code></pre>