Nick Craig-Wood wrote: >> #!/usr/bin/env python >> import re >> r = re.compile(r'destroy', re.IGNORECASE) >> >> for s in file('bigfile'): >> if r.search(s): print s.rstrip("\r\n")
footnote: if you're searching for literal strings with Python 2.5, using "in" is a lot faster than using re.search. </F> -- http://mail.python.org/mailman/listinfo/python-list