Skip to content

Instantly share code, notes, and snippets.

@gdog2u
Last active July 14, 2021 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdog2u/27ef7746ff643f9a748c08ab59f2759a to your computer and use it in GitHub Desktop.
Save gdog2u/27ef7746ff643f9a748c08ab59f2759a to your computer and use it in GitHub Desktop.
US Phone Number Regex
^(?:[+]?\d[-\s]?)?(?:(?:[(][2-9][0-8][0-9][)]|[2-9][0-8][0-9])[-\s]?)?[2-9]\d{2}[-\s]?\d{4}$
@gdog2u
Copy link
Author

gdog2u commented Apr 12, 2019

Matches the following number schemes

+1(592)-426-2648
+1-(754)236-3842
+1(482)374-3275
1(937)620-6034
1-215-718-9658
+1-513-485-5482
+1513-864-5684
19374258412
(513)-432-1284
(937)932-2315
937-902-9386
937-4364577
937123-4596
9372676032
434-2065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment