There is a regular expression for checking email:
pattern = "^ [a-za-z0-9] [a-za-z0-9 \ .- _] * [A-ZA-Z0-9] * @ ([A-ZA-Z0-9] + ([A-ZA-Z0-9 -] * [A-ZA-Z0-9] +) * \ .) + [A-ZA-Z] * $ "
Tell me, please, why not miss:
At the same time [email protected]
and [email protected]
skips.
Answer 1, Authority 100%
Because hyphen also needs to be shielded using reverse slash:
pattern = "^ [a-za-z0-9] [a-za-z0-9 \. \ -_]
Since in the current entry \.-_
The hyphen sign is perceived as a range of a range, and not as one simple symbol.