diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 2e6c7f715d20d6..23deb1f01b86f2 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -936,7 +936,7 @@ form. >>> print('|'.join(map(re.escape, sorted(operators, reverse=True)))) /|\-|\+|\*\*|\* - This functions must not be used for the replacement string in :func:`sub` + This function must not be used for the replacement string in :func:`sub` and :func:`subn`, only backslashes should be escaped. For example:: >>> digits_re = r'\d+'