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 vstinner
Recipients mathstuf, vstinner
Date 2020-02-13.13:41:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581601309.35.0.417584431491.issue39624@roundup.psfhosted.org>
In-reply-to
Content
str.replace() can be replaced with re.sub() and \b marker.

Example:

>>> re.sub(r'\$prefix\b', '[xxx]', '$prefix $prefixpath')
'[xxx] $prefixpath'
History
Date User Action Args
2020-02-13 13:41:49vstinnersetrecipients: + vstinner, mathstuf
2020-02-13 13:41:49vstinnersetmessageid: <1581601309.35.0.417584431491.issue39624@roundup.psfhosted.org>
2020-02-13 13:41:49vstinnerlinkissue39624 messages
2020-02-13 13:41:49vstinnercreate