Title |
Test
Find
mm/dd/yyyy
|
Expression |
/^(?:(?:0?[13578]|1[02])|(?:0?[469]|11)(?!\/31)|(?:0?2)(?:(?!\/3[01]|\/29\/(?:(?:0[^48]|[13579][^26]|[2468][^048])00|(?:\d{2}(?:0[^48]|[13579][^26]|[2468][^048]))))))\/(?:0?[1-9]|[12][0-9]|3[01])\/(?:0?19|20)\d{2}$/ |
Description |
will match all dates in mm/dd/yyyy format. takes into account leap-years and months without 31 days.,It will only take years starting with 19 and 20 |
Matches |
02/29/2004 | 07/16/2092 | 12/31/1999 |
Non-Matches |
14/29/2004 | 07/32/1992 | 12/31/1899 |
Author |
Rating:
Not yet rated.
Hitesh Chopra
|
Source |
|
Your Rating |
|