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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find UK Driver Licence
Expression
\b[A-Z0-9]{5}\d{1}[01567]\d{1}([0][1-9]|[12][0-9]|[3][0-1])\d{1}[A-Z0-9]{3}[A-Z]{2}\b
Description
Matches the UK Drivers License format: i. Must be 16 characters ii. First 5 characters are alphanumeric. iii. Next 6 characters must be numeric iv. Next 3 characters are alphanumeric v. Last 2 characters are alpha vi. Second character of numeric section can only be 0, 1, 5 or 6. 7. Fourth and fifth characters of numeric section must be in the range 01 to 31.
Matches
SASAS701062AB8DD ASD12405315AA4AA ABCDE101010XY9AA
Non-Matches
SASAS701062AB8D ASD12405315AA4A ABCDE101010XY9A ABD2A121010AM9FA ABCDE101010XY9A9 AbCdE711215GG9aa AFG98101010AM9Fa SSSSS841215SS9SS AFG98101000AM9FA AF¬98101010AM9FA ABC99808275m99sc ABC99808275m99sca ABC99808275m99scsd ABCDE654321A98
Author Rating: Not yet rated. allan
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

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