I want to validate the e-mail address entered by the user that it is like that format [email protected]
. iti.gov.eg
must be writen in the e-mail address. The user must enter his e-mail address in that format in text box.
And how can I retrive it from the text box and check it?
My code is:
var r=/^([a-z\.])+\@(iti)+\.+(gov)+\.+(eg)+$/;
if (!r.test(string))
alert("the email is not correct");
else
alert("your email is correct");
But this is wrong. Can any one help me please?