Re: Filters and sanitizing a regexp
| From: | Nathan Rixham | Date: | Fri, 26 Sep 2008 09:37:01 +0000 |
| Subject: | Re: Filters and sanitizing a regexp | ||
| References: | 1 2 3 4 5 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-280961@lists.php.net to get a copy of this message | ||
Richard Heyes wrote:
Hi,hate to say this but why not cater for all eventualities and just use strtotime( $whatever );I don't think that one is quite right... Your optionals (?) are confusing. Why [0-3]?[0-9] AND the \d?No reason.Why [0-9] at all (since \d is essentially [0-9])?Again, no reason.Why use the discarded capture group (?:) since the [0-3] is already optional?It makes it look more like gibberish?