note 15035 added to function.getmxrr.php
| From: | daniel at pressure dot net dot nz | Date: | Sat, 25 Aug 2001 06:30:44 +0000 |
| Subject: | note 15035 added to function.getmxrr.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17108@lists.php.net to get a copy of this message | ||
I think the regexp's above should in fact read:
eregi("^[0-9a-z_]([_\.-]?[0-9a-z])*@[0-9a-z][0-9a-z\.-]*\.[a-z]{2,4}\.?$", $address)
A literal '.' must be preceded with a backslash (otherwise interpreted as "match any
single char"), and to match a literal '-' place it last in the list.
http://www.php.net/manual/en/function.getmxrr.php