I have a large list of emails I am running through. A lot of the emails have typos. I am trying to build a string that will check valid emails.
this is what I have
Here's a great article by David Celis explaining why every single regular expression you can find for validating email addresses is wrong, including the ones above posted by Mike.
From the article:
The local string (the part of the email address that comes before the @) can contain the following characters:
`! $ & * - = ` ^ | ~ # % ' + / ? _ { }`
But guess what? You can use pretty much any character you want if you escape it by surrounding it in quotes. For example, "Look at all these spaces!"@example.com is a valid email address. Nice.
If you need to do a basic check, the best regular expression is simply /@/
.