#!/usr/bin/perl # Using perl to remove svg tags from html # Because someone asked for an example # Not because this is advisable use strict; use warnings; my $htm = do { local $/; }; $htm =~ s, ]* # svg tag attributes > # end svg tag .*? # inside svg tag (BRITTLE!) # close svg tag ,,gsx; # replace with nothing g=global, s=single-line, x=extended print $htm; __DATA__