Black-Light
2011-04-20 14:47:35 UTC
and if it does not start with a letter a-zA-Z then replace it so that it starts with a letter
so I want some characters like 0-9, - and _ to be allowed but not before the first letter of the string
so that
$username = '-_-User-Name8';
will become
$username = 'User-Name8'
(I have already solved the problem with all characters like $=?!|,.:;ยต and so on. with a simple
$username = preg_replace('/[^a-z0-9A-Z_-]/','',$username);
now I only need to make it start with a letter)