perl -i.bak -ne'if(/whateverStartRegexIs/){$print{$ARGV}=1} if(/whateverEndRegexIs/){$print{$ARGV}=0;} print if $print{$ARGV};' *.html