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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find ISO date yyyy.MM.dd and yyyy-MM-dd
Expression
^((((19|20)(([02468][048])|([13579][26])).02.29))|((20[0-9][0-9])|(19[0-9][0-9])).((((0[1-9])|(1[0-2])).((0[1-9])|(1[0-9])|(2[0-8])))|((((0[13578])|(1[02])).31)|(((0[1,3-9])|(1[0-2])).(29|30)))))$
Description
Validates yyyy.MM.dd and yyyy-MM-dd format date,and also verifying leap years.
Matches
2000.02.29 | 1976.11.10 | 1988-02-29
Non-Matches
2001.02.29 | 1980.04.31 | 1977-05-32
Author Rating: The rating for this expression. Silling Péter
Source http://datacleaner.org/regex/ISO%20date%20(yyyy-mm-dd)
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: Delimeters can be anything
Name: oguh43
Date: 3/14/2024 1:29:37 PM
Comment:
The description is misleading. The regex matches "." for the delimiters thus accepting "2024a01b01" and any other character - not only "."/"-" as adverized.


Title: Delimeters can be anything
Name: oguh43
Date: 3/14/2024 1:29:27 PM
Comment:
The description is misleading. The regex matches "." for the delimiters thus accepting "2024a01b01" and any other character - not only "."/"-" as adverized.


Title: Delimeters can be anything
Name: oguh43
Date: 3/14/2024 1:21:15 PM
Comment:
The description is misleading. The regex matches "." for the delimiters thus accepting "2024a01b01" and any other character - not only "."/"-" as adverized.


Title: Delimeters can be anything
Name: oguh43
Date: 3/14/2024 1:20:50 PM
Comment:
The description is misleading. The regex matches "." for the delimiters thus accepting "2024a01b01" and any other character - not only "."/"-" as adverized.


Title: Delimeters can be anything
Name: oguh43
Date: 3/14/2024 1:20:39 PM
Comment:
The description is misleading. The regex matches "." for the delimiters thus accepting "2024a01b01" and any other character - not only "."/"-" as adverized.


Title: Delimeters can be anything
Name: oguh43
Date: 3/14/2024 1:10:57 PM
Comment:
The description is misleading. The regex matches "." for the delimiters thus accepting "2024a01b01" and any other character - not only "."/"-" as adverized.


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