Email Address Regular Expression That 99.99% Works. Disagree? Join discussion!

Tools & Resources

[the_ad id=”14″]

Just copy and paste the email regex below for the language of your choice. Feeling hardcore (or crazy, you decide)? Read the official RFC 5322, or you can check out this Email Validation Summary. Note there is no perfect email regex, hence the 99.99%.

Free email address validator (with DNS lookup):

emailregex-explained-gui

General Email Regex (RFC 5322 Official Standard)

Python

Javascript

HTML5

In case you ever wonder, below is the regex used in type=”email” from W3C:

Swift (Regex only)

Swift (Regex used in a function)

PHP

Perl / Ruby

Perl 5.10 or newer

Java

Ruby (simple version)

.NET (general pattern match)

C#

VB.NET

Find All Email Addresses in a File using Grep

SQL Server Email Validation

Oracle PL/SQL Email Regex

MySQL


Bonus: What does the following regex do?