note 50862 deleted from function.ereg by tularis
| From: | tularis@php.net | Date: | Thu, 31 May 2007 13:25:26 +0000 |
| Subject: | note 50862 deleted from function.ereg by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127074@lists.php.net to get a copy of this message | ||
Note Submitter: alcator at seznam dot cz
----
Reaction to:
(19[0-9]{2}|20[0-5]{2})-(0[0-9]|1[0-2])-([12][0-9]|3[01])
--> There is more problems than just "this will validate 2005-02-31". The worse problem
is that it WON'T validate 2001-01-01...
(19[0-9]{2}|200[0-5]{1})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
(Note that "00" is no longer possible for days and months, while allowing for 01..09...)
Still, it doesn't protect against non-existent dates.