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?[1-9]|[12][1-9]|3[01])\.(0?[13578]|1[02])\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\.(0?[13456789]|1[012])\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\.(0?[123456789]|1[012])\.20[0-9]{2}|(0?[1-9]|[12][1-9])\.(0?[123456789]|1[012])\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$
Description
Fully functional date validator in format dd.MM.yyyy Works only within range of years 2000-2099 ! It allows leading zeros but does not require them. The last year pattern (enumeration) is not very clever but I will improve it, if needed.
Matches
31.01.2002 | 29.2.2004 | 09.02.2005
Non-Matches
31.11.2002 | 29.2.2002 | 33.06.2000
Author Rating: The rating for this expression. Dalibor Kalna
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: Still bug
Name: andrei
Date: 9/30/2013 7:14:22 AM
Comment:
10.mm.yyyy still doesnt work.


Title: Found bug
Name: Shulga Yevgen
Date: 9/3/2008 12:23:39 PM
Comment:
Expression don't recognize dates 10.mm.yyyy (ex. 10.09.2008).


Title: Bug with 10.MM.yyyy
Name: F16
Date: 3/10/2004 5:47:15 AM
Comment:
Yes there is a great bug with every 10th but it is simple to correct this one


Title: And 10.2.2002 is not correct date?
Name: Bronislav Dohnal
Date: 5/12/2003 10:09:27 AM
Comment:
Every 10th is not correct!


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