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 mrabarnett
Recipients BMintern, Nikker, effbot, ezio.melotti, gerardjp, mchaput, mrabarnett, nneonneo, terry.reedy, timehorse
Date 2012-03-16.00:59:58
SpamBayes Score 0.042759605
Marked as misclassified No
Message-id <1331859599.58.0.92028912424.issue1519638@psf.upfronthosting.co.za>
In-reply-to
Content
The replacement can be a callable, so you could do this:

re.sub(r'(?:\((?:(\d+)|.*?)\)\s*)+$', lambda m: m.group(1) or '', 'avatar (special edition)')
History
Date User Action Args
2012-03-16 00:59:59mrabarnettsetrecipients: + mrabarnett, effbot, terry.reedy, mchaput, nneonneo, timehorse, BMintern, ezio.melotti, gerardjp, Nikker
2012-03-16 00:59:59mrabarnettsetmessageid: <1331859599.58.0.92028912424.issue1519638@psf.upfronthosting.co.za>
2012-03-16 00:59:59mrabarnettlinkissue1519638 messages
2012-03-16 00:59:59mrabarnettcreate