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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[01]?[- .]?\(?(?!\d[1]{2})[2-9]\d{2}\)?[- .]?(?!\d[1]{2})\d{3}[- .]?\d{4}$
Description
A combination of W. D. and JP Honeywell's U.S./Canada phone expressions, but this does allow the legal (but rare) 555 exchange number and forces an area code.
Matches
222.818.1818 | (222)818 1818 | (222) 221-1111
Non-Matches
(122)818.1818 | 911-456-9494 | (436)911-9494
Author Rating: Not yet rated. Mike Snyder
Source Combination of phone regex from W. D. and JP Honeywell
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-2025, RegexAdvice.com | ASP.NET Tutorials