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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Date regex
Expression
^((19[0-9][0-9])|(20[0-1][0-5]))\-((0?[1-9])|(1[0-2]))\-((0?[1-9])|([1-2][0-9])|(3[0-1]))$
Description
Year, month and day with dashes.Year starts from 1900 to 2015 and must be 4 digits.
Matches
2012-05-21 | 1960-12-14 | 1910-5-3
Non-Matches
2011/5/21 | 60-12-14 | 2021-5-3
Author Rating: The rating for this expression. Soroush gholamzadeh
Source Soroush gholamzadeh
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-2025, RegexAdvice.com | ASP.NET Tutorials