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+(?<!align|title|alt|height|width|src)=".+?"
/
g
Input 1
<img title="тест" id="hh" alt="fff" src="/test/" align="left" width="500" dddd="dd" height="300"> Убираем любые параметры, кроме: align, title, alt, height, width, src
Substitution
<img title="тест" id="hh" alt="fff" src="/test/" align="left" width="500" dddd="dd" height="300"> Убираем любые параметры, кроме: align, title, alt, height, width, src