def strip_newsgroup_quoting(text):
 good_lines = [line for line in text.split('\n') if (not _QUOTE_RE.search(line))]
 return '\n'.join(good_lines)

def strip_newsgroup_quoting ( text ) : good_lines = [ line for line in text . split ( '\n' ) if ( not _QUOTE_RE . search ( line ) ) ] return '\n' . join ( good_lines )
given text in "news" format .