fork(6) download
  1. <?php
  2.  
  3. $output = "hello this is my number +39 3331111111 how are you?";
  4. preg_match_all('/((\b00|\+)39[\. ]??)??3\d{2}[\. ]??\d{6,7}\b/',$output,$matches);
  5. echo '<pre>';
  6. print_r($matches[0]);
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
<pre>Array
(
    [0] => +39 3331111111
)