Steffen Kamper schrieb am 10.01.2009 16:16 Uhr:
> the syntax is bit different, also the - in characterclass has to be escaped
>
> preg_replace('/[^A-Za-z0-9_\-.]/','',$username)
I guess, the same with the dot. ;-)
preg_replace('/[^A-Za-z0-9_\-\.]/','',$username);
Marcus.