Regular Expression to Validate Email Address.

vishalneeraj-24503
Posted by vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 245
Below Regular Expression will accept Email Address in Upper Case too.
<script type = "text/javascript" language = "javascript">
function validate_email(obj)
{
var reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;

if (reg.test(obj))
{
return true;
}
else
{
return false;
}
}
</script>

Comments or Responses

Login to post response