On Fri, Nov 14, 2003 at 04:32:35PM +0900, Dave G wrote: : : > ... escaping isn't necessary. : : Thanks so much for all the helpful advice! : Okay, included the + character, and removed the escaping. And I know I'm : supposed to checking into preg_match, but I'm looking at this as an : opportunity to learn about regular expressions, so I still have a : question. I'm confused why hyphens wouldn't still need escaping. Hyphens : are used to express a range of characters. If there's a hyphen there, : won't PHP think I'm looking for a range from nothing to nothing? Or is : it clever enough to figure out what's going on? : (!eregi('[EMAIL PROTECTED]', $email)
The last part of your pattern needs to be changed because it allows for a top-level domain to contain numbers and hyphens. Currently, such a thing does not exist. Also, the 2nd part of your pattern allows for a 2nd-level domain to start and end with a hyphen, which is also disallowed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php