$ perl -ne 'print unless /<!-- REMOVESTART -->/ .. /<!-- REMOVEEND --> +/;' somefile.html > newfile.html
You may need to do /\Q ... \E/ if your tags contain regular expression metacharacters that would need to be escaped. If your start and end tags are more difficult to identify then an HTML parser would be more appropriate.
Cheers,
JohnGG
In reply to Re: Perl Command Line Regex
by johngg
in thread Perl Command Line Regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |