in reply to Regular expression question

Regular expressions can't parse HTML reliably. It's safer to parse the HTML with a proper parser and remove the element there. For example, in XML::XSH2, you can do
open :r :F html file.html ; delete //svg ; save :F html :b ;
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]