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 1
Title Test Details Pattern Title
Expression
(?<Year>(19|20)[0-9][0-9])-(?<Month>0[1-9]|1[0-2])-(?<Day>0[1-9]|[12][0-9]|3[01])
Description
This pattern will match all dates from the year 1900 to 2099, invalid dates like 0000-00-00 will not be accepted. Replacement string can be used as the Year Month and day is named. The &quot;-&quot; character can be replaced with &quot;/&quot; character for the required format, and also the &lt;Year&gt;, &lt;Month&gt; and &lt;Day&gt; can also be interchanged according the local culture format (eg dd/mm/yy)
Matches
1900-01-01 | 2099-12-31 | 2004-10-11
Non-Matches
2004-01-00 | 2004-00-01 | 0000-01-01
Author Rating: The rating for this expression. Binoj Antony
   Displaying page 1 of 1 pages; Items 1 to 1

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