title: how to restrict some specific characters in javascript regular expression
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address">Using a regular expression to validate an email address</a>  </p>
  </blockquote>
  
  
  
  <p>I have just made a RE for email address. Its a simplest one and works well. But i want to make it more better. I mean to say that, an email address can have alphanumeric characters, underscores "_", dot "." but it cannot contain hyphen "-", semicolon ";" etc. Below is my RE that i have just made for email address.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;script&gt;
  str = "assad-ch7@Yahoo.com";
  
  re = /[a-z0-9][@]((yahoo)|(hotmail)|(gmail))[.]((com)|(co.uk))/i; 
  
  
  result = re.test(str);
  
  document.write(result);
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Furthermore, is this the right way to make an RE for an email address?? </p>