I've read basic regular expressions on different websites to study them. my problem is that I don't understand some of them. here is an example I'm looking at to validate an e-mail address from w3schools
$email = test_input($_POST["email"]);
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)) {
$emailErr = "Invalid email format";
}
I don't understand the part [\w\-]+
from my own understanding it says "string that has at least a alphanumeric". can you give me a clear explanation of this?