Perl
I’m always trying to remember that nice little bit of regex to get something done in a few seconds, and finding the right method takes hours…
Delete all but lines between START and END (from IBM):
perl -i.old -ne ‘print unless /^START$/ .. /^END$/’ foo.txt