Raymond Hettinger <[email protected]> added the comment:
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'
----------
nosy: +rhettinger
status: pending -> open
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue47023>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com