note 58427 deleted from function.ereg by tularis
| From: | tularis@php.net | Date: | Thu, 31 May 2007 13:23:22 +0000 |
| Subject: | note 58427 deleted from function.ereg by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127064@lists.php.net to get a copy of this message | ||
Note Submitter: bnewbold at codegreene dot com
----
mcallier at gmail dot com's expression for zip codes is still wrong.
"^[0-9]{5}(-[0-9]{4})*$" will call the following zip codes good:
91425
91425-3444
91425-3444-3455
91425-3444-3455-4556
(etc)
the star (*) in the expression means zero or more.
Instead it should be a question mark (?) meaning zero or one only.
use "^[0-9]{5}(-[0-9]{4})?$"