I'm trying to validate email addresses in javascript, I tried this
/[A-Za-z0-9_\-]+\@[A-Za-z0-9_\-]+\.[A-Za-z0-9_\-]+/
but it matched the input "b@aaa", where the middle "a" letter should be a dot to match. and tried not to escape the dot like this:
/[A-Za-z0-9_\-]+\@[A-Za-z0-9_\-]+.[A-Za-z0-9_\-]+/
and it matched the input too.