Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2019-05-20 07:25
Flavor·ECMAScript (JavaScript)

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

Description

Tries to match RFC 5322 as well as possible

Submitted by anonymous