I don't know much about regex and I'm trying to create a username string accepts only English letters and numbers and only one dot.
I have this regex code:
if(preg_match('/[^A-Za-z0-9]/', $username)){
$error = "Invalid Username";
}
this code allowed me to have only English letters and number, I want to add dots to this code, and accept only one dot.