fork(3) download
  1. <?php
  2.  
  3. $string = "foo 123456 as asd 1234567890 asd 123 asjhdk12389793 ";
  4. if (preg_match_all("/(?<!\d)\d{5,9}(?!\d)/", $string, $match)) {
  5. print_r($match);
  6. };
  7. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => 123456
            [1] => 12389793
        )

)