note 49927 deleted from function.ereg by tularis

From: Date: Thu, 31 May 2007 13:26:16 +0000
Subject: note 49927 deleted from function.ereg by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127080@lists.php.net to get a copy of this message
Note Submitter: Carrajola ---- Since the example has the purpose of validating the date in $date and not just change it, the regular expression is not accurate, because a date like 0000-00-00 is validated. It should be something like this: (19[0-9]{2}|20[0-5]{2})-(0[0-9]|1[0-2])-([12][0-9]|3[01]) this regular expression is still not totally correct because it's not sensible to a impossible date like 2005-02-31.

« previous php.notes (#127080) next »