RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details US Phone Validation
Expression
^(\+?1(-|\.|\s)?)?((\(((8(00|22|33|44|55|66|77|[8[0-9]))|900)\)|((8(00|22|33|44|55|66|77|[8[0-9]))|900))(-|\.|\s)?\d{3}(-|\.|\s)?\d{4}|(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))(-|\.|\s)?[2-9]([02-9]\d|1[02-9](-|\.|\s)?\d{4}))$
Description
This is a very detailed RegEx that only allows for valid phone number combinations in accordance with "North American Numbering Plan" as well as any combinations for toll (9XX) and toll-free (8XX) numbers. Numbers can contain parenthesis around the area code, can include 1 or +1, and can be delimited using "-", ".", or space.
Matches
800-211-5555 | (800) 211-5555 | 1-800-211-5555 | +1-800-211-5555 | 555 212 1234 | 555.212.1234
Non-Matches
555-555-555 | 555-211-5555 | 2-555-555-5555 | 555-123-1234
Author Rating: Not yet rated. Sean Chu
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials