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(?=(?:(?!class="nothis")[^>])+>\s*<img)
/
gm
Input 1
<a href="" class="nothis"><img src="" alt="" title="" border="0" /></a> <a href="" class="yesthis"><img src="" alt="" title="" border="0" /></a>
Extraction
<a href="" class="nothis"><img src="" alt="" title="" border="0" /></a> <a href="" class="yesthis"><img src="" alt="" title="" border="0" /></a>