|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-04 10:53 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 22:00:01 2025 UTC |
Description: ------------ I went to check a mail but have some question. Reproduce code: --------------- $mail = "foo@gmail.com"; First way eregi("^[[:alnum:]_-\.]+@[\.[:alnum:]]+\.(com|edu|net|org)(\.[[:lower:]]{2})?$",$mail) Second way eregi("^[[:alnum:]_\.-]+@[\.[:alnum:]]+\.(com|edu|net|org)(\.[[:lower:]]{2})?$",$mail) Expected result: ---------------- First way return True Second way return True Actual result: -------------- First way Warning: eregi() [function.eregi]: REG_ERANGE in C:\foo\foo.php on line Second way return True