| Title |
Test
Find
Pattern Title
|
| Expression |
^([2-9]\d{3}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|(([2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))0229)$ |
| Description |
yyyyMMdd with leap year validation, starting from year 2000 only.
The length of the expression is minimized, but still validates all entries.
If you want it with years like 1600 or separators, just ask :) |
| Matches |
20000101 | 20051231 | 20040229 |
| Non-Matches |
19990101 | 20053112 | 20050229 |
| Author |
Rating:
Dany Lauener
|
| Source |
Dany Lauener |
| Your Rating |
|
Title: search-ebook.com
Name: Olya
Date: 7/24/2009 9:13:45 AM
Comment:
Find the files you are looking for at search-ebook.com the most comprehensive source for free-to-try files downloads on the Web
Title: Great
Name: Venkatesh
Date: 11/12/2007 2:04:31 PM
Comment:
Excellet Work it really works well
Title: Does Not Match 08/23/2007
Name: iamtgo3
Date: 8/23/2007 11:58:50 AM
Comment:
I used this and it seems to work with sample data but it does not however work with 08/23/2007 is there a reason for this?
Title: Does Not Match 08/23/2007
Name: iamtgo3
Date: 8/23/2007 10:00:29 AM
Comment:
I used this and it seems to work with sample data but it does not however work with 08/23/2007 is there a reason for this?
Title: Optional components and separators
Name: Jon B
Date: 6/22/2007 8:35:10 PM
Comment:
Hi, this looks awesome, however I can't get it to do what I want which is to match:
2007/12/31/ ||| 2007/12/31 ||| 2007/12/ ||| 2007/12 ||| 2007/ ||| 2007
My reason is that I am looking to use it for 'clean urls' - so the separators are mandatory between components, but optional afterwards.
I'm hoping you can help me out since you seem to have a great grasp of regex. If you'd prefer to email me then please use flotsam[at]scrwd[dot]com
Thanks.
Title: Optional components and separators
Name: Jon B
Date: 6/22/2007 4:53:44 PM
Comment:
Hi, this looks awesome, however I can't get it to do what I want which is to match:
2007/12/31/ ||| 2007/12/31 ||| 2007/12/ ||| 2007/12 ||| 2007/ ||| 2007
My reason is that I am looking to use it for 'clean urls' - so the separators are mandatory between components, but optional afterwards.
I'm hoping you can help me out since you seem to have a great grasp of regex. If you'd prefer to email me then please use flotsam[at]scrwd[dot]com
Thanks.
Title: lakshmi p
Name: lakshmi narayana p
Date: 2/17/2006 11:15:18 AM
Comment:
it is very great and very helpful. could you please update me with yyyy/mm/dd format. my mail id is plnarayana1942@yahoo.co.in,lakshmip@intelligroup.com
Title: If you want it with years like 1600 or separators, just ask :)
Name: Tom Verkon
Date: 7/25/2005 11:31:52 AM
Comment:
What would this expression look like if I wanted to include years earlier than 2000?