$re = '/^([2-9]{1})([0-9]{2})([\s.-]?)([2-9]{1})([0-9]{2})([\s.-]?)([0-9]{4})$/m';
$str = '212-222-1010
(203)753-5678
(203) 753-5678
201-853-6909
800-289-2583
215 5551212
515555121200000
201.853.6909
201 853 6909
201-853-6909
201 853 6909
101.853.6909
1018536909
666-666-6669
(208) 555-1234
666-666-666
666 666 6666
666.666.6666
555 555 5555
222-222-2222
123-123-132
236-548-9888';
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