note 73396 deleted from function.preg-match by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 18:34:21 +0000 |
| Subject: | note 73396 deleted from function.preg-match by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127641@lists.php.net to get a copy of this message | ||
Note Submitter: anon
----
axima's function that attempts to match preg_match a date has an error in his pattern.
if the day is the 20th or 10th then it fails. so, you want to use:
/^([1-9]|0[1-9]|[12][0-9]|3[01])\D
([1-9]|0[1-9]|1[012])\D
(19[0-9][0-9]|20[0-9][0-9])$/