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
/
(<h1>(.+?)<\/h1>)<img class=".*?" alt="[^"]+" (src="[^"]+")>
/
gm
Test String
New
<h1>Bla-bla-bla</h1><img class="class" alt="image" src="img.jpg">
Substitution
Processing...
\1<img \3 alt="\2">