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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(?:\([2-9]\d{2}\)\ ?|(?:[2-9]\d{2}\-))[2-9]\d{2}\-\d{4}$
Description
This US phone number edit with restricted format options: Accepts optional parens on area code with or without following space, and dashes between area code, central office code and station code. Formats include only (222) 555-1212 (with or without a space) and 222-555-1212. Conforms to NANP A-digit and D-digit requirements (ANN-DNN-NNNN). Area Codes 001-199 are not permitted; Central Office Codes 001-199 are not permitted.
Matches
(234) 555-1212 | (234)555-1212 | 234-555-1212
Non-Matches
(234)5551212 | 234 555 1212 | 234) 555-1212
Author Rating: Not yet rated. Don Johnston
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: Test Find Pattern Title
Name: Don Johnston
Date: 9/17/2010 3:41:49 AM
Comment:
hi


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