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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find US Phone Number w/ ext.
Expression
^([+]?\d{1,4})?([\s-.+]?\(?\d{3}\)?)?([\s-.]?\d{3})([\s-.]?\d{4})\s?([eE]?[xX]?[tT]?[\s-.:]?\s?\d{4})?
Description
US phone regex which allows the country code prefix and extension suffix
Matches
1-123-456-7890 ext.1234, +1 (123) 456-7890 x: 1234, 1234567890 EXT 1234
Non-Matches
1 (123) 456-7890 m: 1234, +123456-123-456-7890 T: 12356
Author Rating: Not yet rated. Kennethnume
Source ^([+]?\d{1,4})?([\s-.+]?\(?\d{3}\)?)?([\s-.]?\d{3})([\s-.]?\d{4})\s?([eE]?[xX]?[tT]?[\s-.:]?\s?\d{4})?
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-2024, RegexAdvice.com | ASP.NET Tutorials