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 rhettinger
Recipients eric.smith, ezio.melotti, mrabarnett, rhettinger, siddheshsathe
Date 2022-03-17.20:36:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647549397.1.0.691798928908.issue47023@roundup.psfhosted.org>
In-reply-to
Content
There seem to be a number of escaping problems in the OP's example.

Is this what was intended?

>>> re.sub(r"\{(\w+)\}", r"\1", "Hello! {user}")
'Hello! user'
History
Date User Action Args
2022-03-17 20:36:37rhettingersetrecipients: + rhettinger, eric.smith, ezio.melotti, mrabarnett, siddheshsathe
2022-03-17 20:36:37rhettingersetmessageid: <1647549397.1.0.691798928908.issue47023@roundup.psfhosted.org>
2022-03-17 20:36:37rhettingerlinkissue47023 messages
2022-03-17 20:36:37rhettingercreate