i
Hate
Regex
Library
Cheatsheet
Community
Open playground
match an email more accurately
Regex title
View-only original
Remix in playground
JavaScript
Expression
/
Regular expression
(
(
[^<>()\[\]\\.,;:\s@"]
+
(
\.
[^<>()\[\]\\.,;:\s@"]
+
)
*
)
|
(
"
.
+
"
)
)
@
(
(
\[
[0-9]
{1,3}
\.
[0-9]
{1,3}
\.
[0-9]
{1,3}
\.
[0-9]
{1,3}
]
)
|
(
(
[a-zA-Z\-0-9]
+
\.
)
+
[a-zA-Z]
{2,}
)
)
(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))
/
gm
g
global
i
ignore case
m
multiline
s
dot all
u
unicode
y
sticky
Test bench
Sample text
5 matches
[email protected]
[email protected]
[email protected]
[email protected]
hello@ @test email@gmail theproblem@
[email protected]
geon@ihateregex.io test@gmail.com mail@test.org mail@testing.com hello@ @test email@gmail theproblem@test@gmail.com
Structure
Railroad diagram
SVG
PNG
Embed
Live