Please read the requirement before thinking it is duplicate of any similar question.
As far as I found more than 20 Email validation regular expressions But all of them allows
as valid email address!!!
I want to restrict that only two dots(.) should be allowed.
For Example:
Valid Emails
Invalid Emails
@.co
@a.com
a@a
[email protected] //maximum two dots allowed otherwise invalid
[email protected] //maximum two dots allowed otherwise invalid
For this I tried with
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9]+\.[a-zA-Z]{2,5}[\.[a-zA-Z]{2,5}]{0,1}
It is working with 2 dots but throwing invalid message for