#!/usr/bin/env python """ """ __version__="1.0" __author__="Art Taylor" import re, string, sys style = "\n" if __name__ == '__main__': head_pattern = re.compile('', re.IGNORECASE) sponsoredby_pattern = re.compile('Sponsored by:', re.IGNORECASE) plug_start_pattern = re.compile('', re.IGNORECASE) plug_end_pattern = re.compile('', re.IGNORECASE) plugs = 0 for line in sys.stdin.readlines(): line = head_pattern.sub(style, line) line = sponsoredby_pattern.sub('', line) if plug_start_pattern.match(line): plugs = 1 if plugs == 0: sys.stdout.write(line) if plug_end_pattern.match(line): plugs = 0