Question

I need the best regular expression for validating emails.

  • They must support country extensions, like .ca, co.uk, tw, etc.
  • And they must allow for new extensions, like .club, .online, .social, etc.

Any suggestions appreciated!

1 Answers

This is what you are looking for:

^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$

It supports the scenarios you mentioned