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 Pattern Title
Expression
^((\d[-. ]?)?((\(\d{3}\))|\d{3}))?[-. ]?\d{3}[-. ]?\d{4}$
Description
This is a pretty flexable phone number validator for US numbers. Allows optional country code and area code. Allows separation of numbers with " ", "-", "." or nothing to seperate. Area codes can be in parenthesis or not. Validates that you'll get 7, 10, or 11 digits in the way the most number of people option when writing them.
Matches
1(555)444-3333 | 202.555.3333 | 555-4444
Non-Matches
555-222-33334 | 1(303)5a4-5555 | 1 202) 111-3333
Author Rating: Not yet rated. Josh Aversa
   Displaying page 1 of 1 pages; Items 1 to 1

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