The regular expressions posted in this thread are out of date now because of the new generic top level domains (gTLDs) coming in (e.g. .london, .basketball, .通販). To validate an email address there are two answers (That would be relevant to the vast majority).
- As the main answer says - don't use a regular expression, just validate it by sending an email to the address (Catch exceptions for invalid addresses)
- Use a very generic regex to at least make sure that they are using an email structure
{something}@{something}.{something}
. There's no point in going for a detailed regex because you won't catch them all and there'll be a new batch in a few years and you'll have to update your regular expression again.
I have decided to use the regular expression because, unfortunately, some users don't read forms and put the wrong data in the wrong fields. This will at least alert them when they try to put something which isn't an email into the email input field and should save you some time supporting users on email issues.
(.+)@(.+){2,}\.(.+){2,}