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 Date Grouped
Expression
(?<DATE>(?:(?:(?<year1>(?:1[89])|(?:[2468][048]|[3579][26]) (?!00))(?<year2>00|[02468][1235679]|[13579][01345789]) (?:(?:(?<month>(?:[0][13578])|(?:1[02])) (?<day>0[1-9]|[12][0-9]|3[01]))| (?:(?<month>0[469]|11)(?<day>0[1-9]|[12][0-9]|30))| (?:(?<month>02)(?<day>0[1-9]|1[0-9]|2[0-8])))| (?:(?:(?<year1>(?:[2468][048]|[3579][26])00)| (?<year1>(?:(?:1[89])|[2468][048]|[3579][26]) (?!00))(?<year2>[02468][048]|[13579][26])) (?:(?:(?<month>(?:(?:[0][13578])|(?:1[02]))) (?<day>0[1-9]|[12][0-9]|3[01]))| (?:(?<month>0[469]|11) (?<day>(?:0[1-9]|[12][0-9]|30)))| (?:(?<month>02)(?<day>0[1-9]|[12][0-9])))))))
Description
Test a date in the format of YYYYMMDD. and returns a match with the grouped date parts. The groups are: (example 20001101) DATE - 20011201 (the full date) year1- 20 (the century) year2- 01 (the year of the century) month- 12 (the month) day - 01 (the day of the month)
Matches
20010101 20000229 19960229 20010101 18101231
Non-Matches
19000229 19980229 20071131
Author Rating: Not yet rated. Raymond Roelands
   Displaying page 1 of 1 pages; Items 1 to 1

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