Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?:.*?(\w[^@\s]*@[^@\s]{2,}).*?|.+)$
/
gm
Input 1
1
New
Sample text for testing: abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 _+-.,!@#$%^&*();\/|<>"' 12345 -98.7 3.141 .6180 9,000 +42 555.123.4567 +1-(800)-555-2468 foo@demo.net bar.ba@test.co.uk www.demo.com http://foo.co.uk/ http://regexr.com/foo.html?q=bar This is a line with an email@person.com email address
Substitution
\1