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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
((\(\d{3}\) ?)|(\d{3}[- \.]))?\d{3}[- \.]\d{4}(\s(x\d+)?){0,1}$
Description
This will match US most common telephones format with extension or with out extension. Works with both Java and .NET.
Matches
(123) 456-7890 | (123) 456-7890 x123
Non-Matches
(123) 456-7890 x123x | (123) 456-7890 x123 x123 | (123) 456-7890 x
Author Rating: Not yet rated. khoi le
Source Extension of Steven Smith regex
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: Works great with Ajax MaskedEditExtender
Name: BiNiCi
Date: 10/31/2007 1:54:13 AM
Comment:
Awesome! This is what I needed for the Ajax extender that masks the text box!


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