I want to restrict duplicate words in an email using regex.
Currently I am using below regex that also restrict 2 consecutive dots (ex: a@gmail..com)
regexp: /A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z][{a-z},0-9](?:[a-z0-9-]*[a-z0-9]){1-2}?)$/i,
Now I want to also restrict duplicate words in email for example :-
abc.xyz@gmail.com.com
It should not accepted second .com .