>From the documentation: 7.2.4. Regular Expression Objects, search(string[, pos[, endpos]]) ... the '^' pattern character matches at the real beginning of the string and at positions just after a newline, but not necessarily at the index where the search is to start....
But I'd like to do just that. In Emacs regexps, I think the closest equivalent would be \=. Then I could do something like that, and also find directly adjacent matches reo = re.compile( r'(\=|...)...' ); while True mo = reo.search(text,pos) if not mo: break ... Flo -- http://mail.python.org/mailman/listinfo/python-list