regex for email simple
match an email
[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+
Regex Flags
global match
?
ignore case
?
multiline
?
dotAll
?
unicode
?
sticky
?
[email protected]
[email protected] [email protected]
[email protected]
hello@
@test
email@gmail
theproblem@[email protected]
mail [email protected]
Simple email regex that works most of the times
[^@ \\t\\r\\n]
matches for anything other than @, space, tab, new lines repetitions of a non-whitespace character.
Cheatsheet
expr | usage |
---|---|
/hello/ | looks for the string between the forward slashes (case-sensitive) |
/[^abcd]/ | matches anything except the characters in square brackets |
iHateRegex
by
geon