PHP Gurus, I have an eregi() function that I'm using to validate emails that users enter into a form. I pretty much took it directly from the book "PHP and MySQL Web Development". It looks like this: (!eregi('[EMAIL PROTECTED]', $email)
1. Special characters within brackets do not need to be escaped. [.] will match a period.
2. If you're going to include a hyphen within brackets, it needs to be the last character, otherwise you're signifying a range. [a-z] is a through z. [a-] is a or a hyphen.
3. I don't think a hyphen is even legal in an email address...
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php