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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
Title Test Details 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
Title Test Details mixed case short and long month format - whole word
Expression
\b([Jj](([Aa][Nn][Uu][Aa][Rr][Yy]|[Aa][Nn])|([Uu][Nn][Ee]|[Uu][Nn])|([Uu][Ll][Yy]|[Uu][Ll])))\b|\b((([Ss][Ee][Pp][Tt]|[Nn][Oo][Vv]|[Dd][Ee][Cc])[Ee][Mm])|[Oo][Cc][Tt][Oo])[Bb][Ee][Rr]|([Ss][Ee][Pp]|[Nn][Oo][Vv]|[Dd][Ee][Cc]|[Oo][Cc][Tt])\b|\b([Mm][Aa]([Yy]|([Rr][Cc][Hh]|[Rr])))\b|\b[Aa](([Pp][Rr][Ii][Ll]|[Pp][Rr])|([Uu][Gg][Uu][Ss][Tt]|[Uu][Gg]))\b|\b[Ff]([Ee][Bb][Rr][Uu][Aa][Rr][Yy]|[Ee][Bb])\b
Description
Is there an easier way of doing this??
Matches
jan JAN JaN january JANUARY JUly MarCh mAY
Non-Matches
mer jen jely moy MrY
Author Rating: Not yet rated. allan
   Displaying page 1 of 1 pages; Items 1 to 2

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