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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[+][0-9]\d{2}-\d{3}-\d{4}$
Description
This is a basic telephone number vaildation which needs a compulsory prefix of a '+' sign with three digits and followed by a hipen, another three digits and finally followed by another hipen and four more digits. Regards, Senthil Gunabalan
Matches
+974-584-5656 | +000-000-0000 | +323-343-3453
Non-Matches
974-584-5656 | +974 000 0000
Author Rating: Not yet rated. Senthil Gunabalan
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: What's the point?
Name: Vlad I
Date: 6/15/2004 4:00:07 PM
Comment:
If you're going to allow bad data (+000-000-0000) they why bother to validate at all?


Title: US phone numbers?
Name: John K
Date: 5/24/2004 7:11:17 AM
Comment:
I presume this is for US phone numbers only. That should be stated in the description. (Also, "hiphen" is spelled "hyphen"). Good job on the regex!


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