title: reading regular expression for beginner
body: <p>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</p>
  
  <pre><code>$email = test_input($_POST["email"]);
  if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)) {
     $emailErr = "Invalid email format"; 
  }
  </code></pre>
  
  <p>I don't understand the part <code>[\w\-]+</code> from my own understanding it says "string that has at least a alphanumeric". can you give me a clear explanation of this?</p>