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
`
(?is)<a[^>]+href=["'](?P<link>.*?)["']*.?> match this text\.
`
Input 1
New
<html><body> This is the start. <a href="http://example.com/path">We don't want to match this text.</a> <a href="http://www.example.com/another/path" style="font-family:Arial, Helvetica, 'sans-serif'; color:#838383;font-size:12px; line-height:14px"></a> match this text.<a href="blah">We also don't want to match this text</a> </body></html>
Substitution
<html><body> This is the start. <a href="http://example.com/path">We don't want to match this text.</a> <a href="http://www.example.com/another/path" style="font-family:Arial, Helvetica, 'sans-serif'; color:#838383;font-size:12px; line-height:14px"></a> match this text.<a href="blah">We also don't want to match this text</a> </body></html>