bearophile: > cp_regular_expression = re.compile("^a complex regular expression > here$") > for line in file(inputfile): > if cp_regular_expression.match(line) and result_seq:
Sorry, you can replace that with: cp_regular_expression = re.compile("^a complex regular expression here$").match for line in file(inputfile): if cp_regular_expression(line) and result_seq: That is a bit faster. Bye -- http://mail.python.org/mailman/listinfo/python-list