On Tue, 09 Dec 2003 09:43:24 -0600, John Hunter <jdhunter at ace.bsd.uchicago.edu> wrote: > rgxPrev = re.compile('.*?a.*?') . doesn't match newlines unless you specify the re.DOTALL / (?s) flag, so it won't match unless 'a' is on the very first line. Add (?s) to your expression, and it should work (though it'll be much slower than the .find() method). --amk