This is stupid I know, but I can't find a way to do it, I know the expressions but I don't know where and how to set them..
I have
if (!preg_match ("/([a-z0-9._]+)+$/", trim($_POST["username"]))){
dosomething
}
I need to verify that "username" has only upper/lowercase chars with "." and "_" allowed. but I want also to NOT allow whitespaces in the username
I tried the followings with no success
/([a-z0-9._^\s]+)+$/
/([a-z0-9._\S]+)+$/
/([a-z0-9._^ ]+)+$/
Thank you