Javascript: Email regex with min lenght and not max lenght -
this question has answer here:
- how validate email address in javascript? 65 answers
i have regex on javascript:
new regexp('^[0-9a-z._-]+@{1}[0-9a-z.-]{2,}[.]{1}[a-z]{2,}$','i');
and want modify it. last part of mail must have minimum value : 2 chars , no maximum length can put mails such .localhost .paris .thisismyexample ... how may do? thank answers
new regexp('\b[a-z0-9._%+-]+@(?:[a-z0-9-]+\.)+[a-z]{2,}\b','i');
Comments
Post a Comment