Menu
I’m writing a script to validate a username for a registration page. I want to alert the user if they have any special characters in their username, and I am using the php preg_match() function to test for special characters. I’m not very good with regular expressions, does anyone know a good regular expression to match all special characters wherever they may be in the username string? Also is there a better way to do this than using preg_match?