I am trying to get a string to contain ONLY numbers, letters and whitespaces:
if (!ereg("[\sA-za-z0-9]+$", $string)) { ...
doesn't work, neither does:
if (!ereg("[[A-za-z0-9][\s]]+$", $string)) { ...
i thought \s denotes a whitespace?
Any help would be much appreciated!
thanks,
Gerry
reg-exp newbie