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 U.S. Phone numbers
Expression
^(((\(\d{3}\)|\d{3})( |-|\.))|(\(\d{3}\)|\d{3}))?\d{3}( |-|\.)?\d{4}(( |-|\.)?([Ee]xt|[Xx])[.]?( |-|\.)?\d{4})?$
Description
with or without area code (of various forms)(does not allow for unbalanced parens in the area code). With or without an extension (of various forms). Does not allow for leading or trailing space.
Matches
(123)-456-7890 Ext 1234 | 123-456-7890 | (123).456.7890 | 123.456.7890 | 1234567890ext1234 | 123-456 7890 X 1234
Non-Matches
123)4567890 | 800callcat | 123456789
Author Rating: Not yet rated. Rick LaCount
   Displaying page 1 of 1 pages; Items 1 to 1

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