Validating Email Addresses is one of the more elusive patterns to define, but this pattern will match 99.99% of all email addresses in actual use today.

A further change you could make is to allow any two-letter country code top level domainĀ and only specific generic top level domains. This regex filters dummy email addresses like asdf@adsf.adsf. You will need to update it as new top-level domains are added.

Example using PHP:

This function will return true/false if the email values passed into it validates against the pattern.


Leave a Reply

Your email address will not be published. Required fields are marked *