Dave -- ...and then Dave G said... % % > ... escaping isn't necessary. % % Thanks so much for all the helpful advice!
You're quite welcome :-) % Okay, included the + character, and removed the escaping. And I know I'm Good! % 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 Sounds good. Note that preg_match will use the same regexp syntax, too. % 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, Yep. % won't PHP think I'm looking for a range from nothing to nothing? Or is If you put the hyphen between two things, yes. If not, no. % it clever enough to figure out what's going on? It's not only a PHP thing; just about any *NIX tool or programming language that understands extended regexps at all will behave that way. I truly wish that I could point you to a canonical reference on the matter, but such a thing escapes me. I'm fairly sure you'd be able to find it -- or a reference to it -- within the GNU space, so perhaps the man page for egrep or such would help. I did a quick google search and found http://www.opengroup.org/onlinepubs/7908799/xbd/re.html which may be helpful. In addition, there is a regex package by Henry Spencer which seems to be everyone's reference point. % (!eregi('[EMAIL PROTECTED]', $email) % % -- % Cheers! % Dave G % [EMAIL PROTECTED] HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature