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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find US Phone Number
Expression
^1?[-\. ]?(\(\d{3}\)?[-\. ]?|\d{3}?[-\. ]?)?\d{3}?[-\. ]?\d{4}$
Description
US Phone number with optional leading 1, optional area code, and optional delimiters (hyphen, space or period)
Matches
18005551212 1.800.555.1212 1-800-555-1212 (800)555-1212 8005551212 800-555-1212 800.555.1212 5551212 555-1212 555.1212
Non-Matches
2-800-555-1212 55-51212 551212 15551212
Author Rating: The rating for this expression. Jason Kittredge
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: This is exactly what I am looking for
Name: Jia Li
Date: 10/23/2006 2:55:44 PM
Comment:
This expression solves our problem. We have existing phone records in many formats like these. It gives a lot of flexibility for users.


Title: my first post - just asking...
Name: seth gordon
Date: 8/21/2006 8:41:38 PM
Comment:
why not ^1?[-\. ]?\(?(\d{3})?\)?[-\. ]?\d{3}?[-\. ]?\d{4}$


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