Hi Brad, > So how to I match a line containing "warning:", as long as it doesn't > start with "exchange.idl"? You want the (?!...) grouping operator. From 'pydoc re': (?!...) Matches if ... doesn't match next. For example: warning_re = re.compile('(?!exchange.idl).*warning[: ].*') Cheers, Jeremy