Can somebody help me in making me understand the regex function-
What these characters means
/^(\w+[\-\.])*\w+@(\w+\.)+[A-Za-z]+$/
function validate(input)
{
var email =/^(\w+[\-\.])*\w+@(\w+\.)+[A-Za-z]+$/;
if(email.test(input))
{
return true;
}
else
{
alert('invalid email id');
return false;
}
}