Don't use the email regex given in example, this one is wrong.
Here are some valid email address according to RFC822 that will not match the regex :
me@example.museum (the tld contains 6 characters)
John Smith <john@smith.com> (Yes, you can put a name in front of an enclosed email address like that)
Some times, using RegEx (or VerbalExpression) is not appropriate. In this case, you should probably write a parser. Here is the implementation of this parser in go : golang.org/src/net/mail/message.go...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Don't use the email regex given in example, this one is wrong.
Here are some valid email address according to RFC822 that will not match the regex :
me@example.museum
(the tld contains 6 characters)John Smith <john@smith.com>
(Yes, you can put a name in front of an enclosed email address like that)Some times, using RegEx (or VerbalExpression) is not appropriate. In this case, you should probably write a parser. Here is the implementation of this parser in go : golang.org/src/net/mail/message.go...