I have a String from a tabel innerHTML where i need to remove all img tags using replace
my Regex removes everthing after the first img tag my code at JSFiddle here
Use non-greedy matching using .*?
var tmp = inner.replace(/<img .*?>/g,"REPLACED");
Regex Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With