I have wrote the below function to validate the email address entered by user.
function checkEmail(v_email)
{
var l_ret=true;
var l_reg = /^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,3}$/;
if (l_reg.exec(v_email)==null){l_ret=false;}
return l_ret;
}
It works perfectly fine.. with lowercase email address, (example.myemail@example.com) but if it detect any capital letter then it fails. like (example.MYemail@example.com).
I am trying to make it work for both capital as well as lower letter but i am not able to make it.. any one good with regex..could please suggest.
thank you in advance...
regards, Mona..