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[234679]{1}[\s]{0,1}[\-]{0,1}[\s]{0,1}[1-9]{1}[0-9]{6}$
Description
The regex matches the UAE land phone numbers. Checks the area codes[04,02,06...etc] strictly. Force user to input phone numbers in strict manner(it take input 04 3452488, but not 04______spaces_______3452488)
Matches
04 3452488 | 04 -3452488 | 04 - 3452499
Non-Matches
01 -3452488 | 04 34524888 | 08 3452488
Author Rating: The rating for this expression. Vathachira Joseph Bino
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: Inefficient pattern.
Name: g1smd
Date: 8/5/2012 1:12:40 PM
Comment:
The [234679]{1} simplifies to [234679] here. The [\s]{0,1} simplifies to \s? here. The [\-]{0,1} simplifies to -? here. The [1-9]{1} simplifies to [1-9] here. These changes will improve parsing speed.


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