title: PHP preg_match function get phone number from string
body: <p>Here is my PHP code. I'm needing a regular expression to get my desired output.</p>
  
  <pre><code>$str = 'abc:123,phoneNumber:631 741-4498, fdsfdsf, hgjhtg,juiy';
  </code></pre>
  
  <p><strong>Expected Output:</strong> <code>631741-4498</code></p>
  
  <pre><code>$str = 'abc:123,phoneNumber:+123 423, fdsfdsf, hgjhtg,juiy';
  </code></pre>
  
  <p><strong>Expected Output:</strong> +123 423</p>
  
  <pre><code>$str = 'abc:123,phoneNumber:+(123) 423-727, fdsfdsf, hgjhtg,juiy';
  </code></pre>
  
  <p><strong>Expected Output:</strong> +(123) 423-727</p>
  
  <p>Here's what I've tried</p>
  
  <pre><code>$str = 'abc:123,phoneNumber:631 741-4498, fdsfdsf, hgjhtg,juiy';
  $str = str_replace(" ","",$str);
  preg_match('/phoneNumber:\s*(.*)/', $str, $matches);
  </code></pre>