Pathological regular expression

John Machin sjmachin at lexicon.net
Sat Apr 11 19:53:52 EDT 2009


On Apr 12, 9:46 am, John Machin <sjmac... at lexicon.net> wrote:

>             result = _re_comments_nc.sub(r"\1", line)

s/_nc// ... that's an artifact of timing it with Non-Capture groups
(?:blahblah) on the two internal groups that don't need to be
capturing (results identical, and no perceptible effect on running
time)



More information about the Python-list mailing list