I have this regular expression for email authentication (valid only x@y.com , abc@defghi.org , something@anotherhting.edu )
/^[a-zA-Z0-9]+@[a-zA-Z0-9]\.(com)|(edu)|(org)$/i
But @ abc.edu and abc@xyz.eduorg are both valid for the regex above. Can anyone explain why this is?
My approach:
source
share