Regular Expressions 101

Community Patterns

email validation (RFC 5322)

0

Regular Expression
ECMAScript (JavaScript)

/
^((?:[A-Za-z0-9!#$%&'*+\-\/=?^_`{|}~]|(?<=^|\.)"|"(?=$|\.|@)|(?<=".*)[ .](?=.*")|(?<!\.)\.){1,64})(@)((?:[A-Za-z0-9.\-])*(?:[A-Za-z0-9])\.(?:[A-Za-z0-9]){2,})$
/
gm

Description

Tries to match RFC 5322 as well as possible

Submitted by anonymous - 5 years ago