This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Bruce Eckel, tim.peters
Date 2016-07-21.21:30:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469136617.29.0.313503728451.issue27586@psf.upfronthosting.co.za>
In-reply-to
Content
Well, some backslash escapes are processed in the "replacement" argument to `.sub()`.  If your replacement text contains a substring of the form

    \g

not immediately followed by

    <

that will raise the exception you're seeing.  The parser is expecting to see a "matched group" reference after "\g", like

    \g<1>
    \g<name_of_named_group>

So it depends on the value of your `new_output`.
History
Date User Action Args
2016-07-21 21:30:17tim.peterssetrecipients: + tim.peters, Bruce Eckel
2016-07-21 21:30:17tim.peterssetmessageid: <1469136617.29.0.313503728451.issue27586@psf.upfronthosting.co.za>
2016-07-21 21:30:17tim.peterslinkissue27586 messages
2016-07-21 21:30:17tim.peterscreate