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>[0-9]{3})[\)]?)?[ \.\-]?(?<Exchange>[0-9]{3})[ \.\-](?<Number>[0-9]{4})
Description
This was used to process a bunch of lines of information to determine if a line was a North American phone number or not. It accepts numbers with or without area code with or without parenthesis and sepearated by space, dash or period.
Matches
(602) 555-3696 | 555-2069 | 213.555.8954
Non-Matches
225-582 | 11000
Author Rating: Not yet rated. Jared Tullis
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: Nice
Name: Damien
Date: 10/29/2008 5:46:56 AM
Comment:
Good one, miss a $ at the end.


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