How to get the "longest possible" match with Python's RE module?

MonkeeSage MonkeeSage at gmail.com
Tue Sep 12 07:50:45 CEST 2006


MonkeeSage wrote:
> So, it seems they are all broken, or python is correct as well.

Aha, sorry about that Licheng (re: Tim's post). I guess "broken"
depends on if you are expecting perl-compatible behavior or otherwise.
I have my own scripts I use to do (f)grep and sed-like operations, so I
almost never use those programs and forgot about the different pattern
semantics (part of the reason I made my own scripts).

Regards,
Jordan




More information about the Python-list mailing list