Checking an email address - Version 02 : EMail : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » EMail »

 

Checking an email address - Version 02

















<html>
<head>
<title>Checking an email address - Version 02</title>
<script type="text/javascript" language="javascript">
<!-- //
function IsMatchingAddress(str){
    var myRegExp = /[a-z0-9-.]{1,30}@[a-z0-9-]{1,65}.(com|net|org|info|biz|([a-z]{2,3}.[a-z]{2}))/ ;
    return myRegExp.test(str)
}

function TestGuess(){
    var EmailAddr = "asdf@navioo.com".toLowerCase();
    alert(IsMatchingAddress(EmailAddr));
}
// -->
</script>
</head>
<body>
<h3>This page allows you to enter and check an email address
 such as asdf@navioo.com,</h3>
<form>
<button type="Button" onclick="TestGuess()">
Click here to enter email address</button>
</form>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» EMail