title: Please explain this e-mail validation regular expression:
body: <p>I have this script uses regular expressions to check that a form field contains a valid email address.Please explain me from declare</p>
  
  <pre><code>var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
  </code></pre>
  
  <p>Thank you</p>
  
  <p>Source:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  /***********************************************
  * Email Validation script- © Dynamic Drive (www.dynamicdrive.com)
  * This notice must stay intact for legal use.
  * Visit http://www.dynamicdrive.com/ for full source code
  ***********************************************/
  
  var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
  
  function checkmail(e){
  var returnval=emailfilter.test(e.value)
  if (returnval==false){
  alert("Please enter a valid email address.")
  e.select()
  }
  return returnval
  }
  
  &lt;/script&gt;
  
  &lt;form&gt;
  &lt;input name="myemail" type="text" style="width: 270px"&gt; &lt;input type="submit" onClick="return checkmail(this.form.myemail)" value="Submit" /&gt;
  
  &lt;/form&gt;
  </code></pre>