>> Posted via a free Usenet account from http://www.teranews.com > Its all about context. If you want to match something but only if it > precedes something else, then you follow the regular expression for > 'something' by the regular expression for 'something else' where > `something else` is enclosed by (?=...) > > The regular expression engine will surreptitiously check that > 'something else' does indeed follow, before returning any match of > 'something'.
How would this differ from just re.search('somethingsomething else') -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list