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
/
(?:http:\/\/domain.com)(\S*\.(?:png|jpg|gif|js|css))\b
/
gm
Input 1
New
Some content including image tags <img src="http://domain.com/image.png" /> and image urls http://domain.com/image.png and javascript links <script src="http://domain.com/funtimes.js"></script> and js urls http://domain.com/funtimes.js but not this image http://notthisdomain.com/nope.png
Substitution
http://cdndomain.com\1
Some content including image tags <img src="http://domain.com/image.png" /> and image urls http://domain.com/image.png and javascript links <script src="http://domain.com/funtimes.js"></script> and js urls http://domain.com/funtimes.js but not this image http://notthisdomain.com/nope.png