title: php regex, extract phone numbers from string?
body: <p>i am having a small problem with my regex which i use to extract phone numbers from a strong </p>
  
  <pre><code>&lt;?php
  $output = "here 718-838-3586 there 1052202932 asdas dasdasd 800-308-4653 dasdasdasd 866-641-6949800-871-0999";
  preg_match_all('/\b[0-9]{3}\s*[-]?\s*[0-9]{3}\s*[-]?\s*[0-9]{4}\b/',$output,$matches);
  echo '&lt;pre&gt;';
  print_r($matches[0]);
  ?&gt;
  </code></pre>
  
  <p>output</p>
  
  <pre><code>Array
  (
              [0] =&gt; 718-838-3586
              [1] =&gt; 1052202932
              [2] =&gt; 800-308-4653
              [3] =&gt; 866-641-6949
              [4] =&gt; 800-871-0999
  
  )
  </code></pre>
  
  <p>this work fine but it returns 1052202932 as one of result which i don't need .<br />
  actually i don't know where is the missing part in my pattern .</p>