I came across a reg ex for email validation:
^[^@]+([@]{1})[0-9a-zA-Z\\._-]+([\\.]{1})[a-zA-Z0-9\\._-]+$
This is a pattern which i found in a standard Adobe Day CQ email validation code. I have a problem with the last matching group [a-zA-Z0-9\\._-]+
where it allows multiple occurrences of digits as well which allows me to enter as a valid input someone@else.9
. Can somebody please help me understand why do we need a digit value in the last matching group.
Any help is appreciated. Please guide me what else regex can be used to validate a standard day to day email input.