title: Match only the first set of numbers in a string
body: <p>I need to retrieve the first set of numbers from a string, but I'm not sure how.</p>
  
  <p>I have the following, which I was expecting to pick each set of numbers so that I could then pick the first key from the <code>$matches</code> array, but it literally matches only the first number.</p>
  
  <p>In this example I'd be looking for '123'. Can someone please let me know how to do this with RegEx (or a better way if RegEx is not best for the job). Thanks.</p>
  
  <pre><code>$e = 'abc 123,456,def, 789-ab-552'; // Just a random example
  $pattern = "/[0-9]/";
  preg_match($pattern, $e, $matches);
  </code></pre>