try this


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


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

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to