我需要从...更改这样的图像
https://www.website.com/images/stuff/95/jgfij/public/2019/09/cow.gif
https://www.website.com/images/stuff/df3/4gy0/public/2015/03/horse.png
https://www.website.com/images/stuff/odpk/f049/public/2020/08/dog.jpg
进入...
https://www.website.com/images/stuff/public/2019/09/cow.gif
https://www.website.com/images/stuff/public/2015/03/horse.png
https://www.website.com/images/stuff/public/2020/08/dog.jpg
我试过这个,但它不起作用
document.body.innerHTML = document.body.innerHTML.replace('https://www.website.com/images/stuff/*/public/,'https://www.website.com/images/stuff/public/');
我一直在尝试找到可以删除 url 某个部分之间的所有内容的东西,但我从来没有运气。