Regular Expressions 101

Community Patterns

Liberal Email Address

1

Regular Expression
ECMAScript (JavaScript)

/
^[^\s@]+@([\w\-]+\.)+[\w\-]{2,}$
/

Description

Very simple & basic. More forgiving, less stringent. Allows anything which looks reasonably valid. Allows one at-symbol. Requires a two part hostname (i.e. abc@localhost is not allowed)

Submitted by billinghamj - 9 years ago