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
/
cat(?![^<]*>|[^<>]*<\/mux-video>|[^"'<>]*href\s*=\s*['"][^'"]*['"])
/
gi
Input 1
New
text with a cat <img src="path/to/cat.jpg" /> <mux-video source="path/to/cat">cat</mux-video> more text with capital Cat CAT cAT <a href="path/to/cat.pdf">this should match cat</a> works!
Extraction
text with a cat <img src="path/to/cat.jpg" /> <mux-video source="path/to/cat">cat</mux-video> more text with capital Cat CAT cAT <a href="path/to/cat.pdf">this should match cat</a> works!