$re = '/^18[0-9]{8}$/m';
$str = '1849781487
1838433023
1855575775
1825054296
1868575843
1800003509
1781354776
1650813649
1762706044
1688111114
1669462381
1632164916';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php