Last active
August 29, 2015 13:56
-
-
Save zerosignalproductions/8831113 to your computer and use it in GitHub Desktop.
Validate a phone number allowing for the format 1-(XXX)-XXX-XXXX, but not 1XX-XXX-XXX or XXX-555-XXXX.
This file contains 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
//https://www.debuggex.com/r/H3Wz2nlxZUJcs7sV/3 | |
/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-??(?!5{3})[2-9]\d{2}-?\d{4}$/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment