Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
~
(?![^<>]*>)([\w\.\-\+]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-zA-Z0-9\-]{2,10}))
~
ig
Input 1
New
does-match@address.com (beginning of the string) <p>Matches HTML content: does-match@address.com</p> Matches addresses surronded by other characters "does-match@address.com" But does not match addresses surronded by angle brackets, which actually make it an HTML tag <does-not-match@address.com>Invalid HTML tag</does-not-match@address.com> Does not match attributes in HTML tags: <img src="images/powered_by.png" title="does-not-match@address.com"> <input id="test" name="test" type="text" value="" placeholder="does-not-match@address.com"> <a href="mailto:does-not-match@address.com">does-match@address.com</a> (ending of the string) does-match@address.com
Extraction
does-match@address.com (beginning of the string) <p>Matches HTML content: does-match@address.com</p> Matches addresses surronded by other characters "does-match@address.com" But does not match addresses surronded by angle brackets, which actually make it an HTML tag <does-not-match@address.com>Invalid HTML tag</does-not-match@address.com> Does not match attributes in HTML tags: <img src="images/powered_by.png" title="does-not-match@address.com"> <input id="test" name="test" type="text" value="" placeholder="does-not-match@address.com"> <a href="mailto:does-not-match@address.com">does-match@address.com</a> (ending of the string) does-match@address.com