try this ereg("^[a-zA-Z0-9:]*$",$string)
all your's is doing is looking for any char in $string that's a-z or A-Z or 0-9 or : instead of all chars, from start to end, being them -----Original Message----- From: Adam Alkins [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 3:20 PM To: PHP List Subject: [PHP] Simple regexp Hi, I'm trying to do a simple regexp to validate if a whole string only contains the numbers 0 to 9, Letters a - f and A - F and the character : Why isn't ereg("[a-zA-Z0-9:]",$string) working? Guidance appreciated. -------------- Adam Alkins http://www.rasadam.com -------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php