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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^\(?(?<AreaCode>[2-9]\d{2})(\)?)(-|.|\s)?(?<Prefix>[1-9]\d{2})(-|.|\s)?(?<Suffix>\d{4})$
Description
US telephone number with area code. Validates and also captures AreaCode, Prefix and Suffix for reformatting.
Matches
(213) 343-1234 | 213-343-1234 | 213 343 1234
Non-Matches
343-1234
Author Rating: Not yet rated. MARK J KRISBURG
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: abc
Name: xyz
Date: 10/23/2007 5:28:25 AM
Comment:
good work


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