I'm have trouble with some code that I have been following in a book regarding regular expressions. I'm attempting to validate an email using a regular expression. Below is a simplified version of the code which reproduces the problem I'm having: <?php define("EMAIL_RE", '^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$'); $email = trim($_GET['email']); $result = eregi(EMAIL_RE, $email); echo $result . "<br />\n"; if ($result) echo "Email valid"; else "Email invalid" ?> Calling this code with the argument get=bob@xxxxxxxxxxx, I'd expect an interger output something like this 15 Email valid Yet instead, all get is a warning that I cannot fathom and nothing else: Warning: eregi() [function.eregi]: REG_ERANGE in C:\Documents and Settings\daniel.stevens\My Documents\Workspace\htdocs\tutoring\eregi_test.php on line 4 I've tried searching for this warning to find out what it means, but I cannot find any reference to it on the web. Is anyone able to tell me what this warning means and why I am not getting the output I'm expecting? Can anyone advise how best to find out what a particular error or warning means so I don't have to ask on this list everytime I come across one that means nothing? php.net does not appear to have a list. Thanks in advance. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php