You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
function valid_email(str)
|
|
{
|
|
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
|
|
if(mailformat.test(str))
|
|
{
|
|
console.log("Valid email address!");
|
|
}
|
|
else
|
|
{
|
|
console.log("You have entered an invalid email address!");
|
|
}
|
|
}
|
|
|
|
valid_email('me-info@example.com');
|