Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-05-11 13:18
Flavor·JavaScript

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

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