toesieo
10/3/2013 - 12:47 PM

The following regex attempts to match numbers that adhere to the North American Numbering Plan. It matches common entry combinations, such a

The following regex attempts to match numbers that adhere to the North American Numbering Plan. It matches common entry combinations, such as #######, ###.###.####, ###-###-####, ### ### ####, and (###) ### ####.

http://www.gigoblog.com/2008/11/28/regex-preg_match-for-zip-codes-phone-numbers-states-urls-and-email-addresses/

/\(?[2-9][0-8][0-9]\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}/