RFC 2822-compliant (mostly) Email Address Regular Expression


/ Published in: Regular Expression
Save to your folder(s)

This regular expression will match almost all valid email addresses. Omits email addresses containing double-quotes and square brackets, which while valid according to [RFC 2822][rfc2822], are almost never used.

[rfc2822]: http://tools.ietf.org/html/rfc2822 "RFC 2822"


Copy this code and paste it in your HTML
  1. [a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

URL: http://www.regular-expressions.info/email.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.