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-9]\d{2}\s*-\s*\d{3}\s*-\s*\d{4}$|^[2-9]\d{9}|^\x28\s*[2-9]\d{2}\s*\x29\s*\d{3}\s*-\s*\d{4}$)
Description
Matches properly formatted US phone numbers. Based on: http://regexlib.com/REDetails.aspx?regexp_id=22
Matches
2345678901 | (234) 567-8901 | 234-567-8901 | (234) 567-8901
Non-Matches
1234567890 | 2345678901 | 234 567 8901
Author Rating: Not yet rated. Seamus
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

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