Created
October 3, 2013 12:47
-
-
Save PyramisDev/6809274 to your computer and use it in GitHub Desktop.
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/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/\(?[2-9][0-8][0-9]\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment