Email validation not working
<p>Hi I am trying to validate an email using regular expresions.This is my code:</p>

<pre><code>       &lt;input type="text" name="email" id="email"/&gt;

       var email = $("input#email"),
       re =  /^[A-Za-z0-9][a-zA-Z0-9._-][A-Za-z0-9]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/; 

       if(re.test(email.val())){
           alert("email valid");
       }else{
           alert("email not valid");
       } 
</code></pre>

<p>No matter what I enter in the text field it says the email is not valid.What is the problem?</p>
