title: Invalid email address using preg_match
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5855811/how-to-validate-an-email-in-php5">How to validate an email in php5?</a>  </p>
  </blockquote>
  
  
  
  <p>I have used the following code to ensure email addresses provided on signup are valid.</p>
  
  <pre><code>(!preg_match("/^( [a-zA-Z0-9] )+( [a-zA-Z0-9\._-] )*@( [a-zA-Z0-9_-] )+( [a-zA-Z0-9\._-] +)+$/" , $email))
  </code></pre>
  
  <p>I entered a standard email address such as</p>
  
  <blockquote>
    <p>yourname@company.co.uk</p>
  </blockquote>
  
  <p>and it is flagging up as being invalid.</p>
  
  <p>Can anyone help me with why this may be happening?</p>