STINNER Victor <[email protected]> added the comment:
str.replace() can be replaced with re.sub() and \b marker. Example: >>> re.sub(r'\$prefix\b', '[xxx]', '$prefix $prefixpath') '[xxx] $prefixpath' ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue39624> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
