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
/
<a (.*?)test(.*?)<\/a>
/
im
Input 1
<a style="text-decoration: none;" target="_blank" href="http://example.com/?qs=df8fc6df1b3b6e7b87c5c8da8e2c0ad34b73a19751c15d1b3efbf37c3ded58b9cca09ee6d80e64bc"><img width="120" height="81" border="0" style="display: block; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #004990;" title="example.com" alt="example.com" src="http://example.com/lib/fe8f12717d67017f72/m/5/20140513_example_Logo1.jpg" /></a></td> </tr> <tr> <td valign="top" align="left"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top" height="17" align="left" style="font-size: 0%;"><img width="1" height="17" border="0" style="display: block;" title="" alt="" src="http://example.com/lib/fe8f12717d62057f7d/m/1/img_spacer.gif" /></td> </tr> <tr> <td valign="top" align="left" style="font-family: Arial,Helvetica,sans-serif; font-size: 11px; color: #656c73; line-height: 18px;">You are subscribed as <a reportname="mailto:_EMAIL__" style="text-decoration: none; color: #5
Substitution
<a style="text-decoration: none;" target="_blank" href="http://example.com/?qs=df8fc6df1b3b6e7b87c5c8da8e2c0ad34b73a19751c15d1b3efbf37c3ded58b9cca09ee6d80e64bc"><img width="120" height="81" border="0" style="display: block; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #004990;" title="example.com" alt="example.com" src="http://example.com/lib/fe8f12717d67017f72/m/5/20140513_example_Logo1.jpg" /></a></td> </tr> <tr> <td valign="top" align="left"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top" height="17" align="left" style="font-size: 0%;"><img width="1" height="17" border="0" style="display: block;" title="" alt="" src="http://example.com/lib/fe8f12717d62057f7d/m/1/img_spacer.gif" /></td> </tr> <tr> <td valign="top" align="left" style="font-family: Arial,Helvetica,sans-serif; font-size: 11px; color: #656c73; line-height: 18px;">You are subscribed as <a reportname="mailto:_EMAIL__" style="text-decoration: none; color: #5