Fredrik Lundh wrote: > John Machin wrote: > > > >> > I forgot to add: I am using Python 2.3.4/Win32 (from ActiveState.com). The > >> > code works in my interpreter. > >> > >> only if you type it into the interactive prompt. see: > > > > No, it doesn't work at all, anywhere. Did you actually try this? > > the OP claims that it works in his ActiveState install (PythonWin?). maybe he > played with re.search before typing in the commands he quoted; maybe Python- > Win contains some extra hacks? > > as I've illustrated earlier, it definitely doesn't work in a script executed by a standard > Python... > > </F>
It is quite possible that the OP played with re.search before before typing in the commands he quoted; however *you* claimed that it [his quoted commands] worked "only if you type it into the interactive prompt". It doesn't work, in the unqualified sense that I understood. Anyway, enough of punch-ups about how many dunces can angle on the hat of a pun -- I did appreciate your other posting about multiple patterns and "lastindex"; thanks. -- http://mail.python.org/mailman/listinfo/python-list