Created
January 10, 2019 00:34
-
-
Save brendanmanning/bf7cec31259176178a65ecf892529fe1 to your computer and use it in GitHub Desktop.
Regex to match a 10 digit phone number, excluding 555 ("movie") numbers
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
(((?!(555))[0-9]{3})-){2}(((?!(5555))[0-9]{4})) | |
123-456-7890 Y | |
555-123-4567 N | |
123-555-4567 N | |
123-456-5555 N | |
550-550-5550 N | |
555-555-5555 N |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment