File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -573,7 +573,8 @@ accepted by the regular expression parser::
573573only inside character classes.)
574574
575575``'\u' ``, ``'\U' ``, and ``'\N' `` escape sequences are only recognized in Unicode
576- patterns. In bytes patterns they are errors.
576+ patterns. In bytes patterns they are errors. Unknown escapes of ASCII
577+ letters are reserved for future use and treated as errors.
577578
578579Octal escapes are included in a limited form. If the first digit is a 0, or if
579580there are three octal digits, it is considered an octal escape. Otherwise, it is
@@ -850,7 +851,9 @@ form.
850851 *string * is returned unchanged. *repl * can be a string or a function; if it is
851852 a string, any backslash escapes in it are processed. That is, ``\n `` is
852853 converted to a single newline character, ``\r `` is converted to a carriage return, and
853- so forth. Unknown escapes such as ``\& `` are left alone. Backreferences, such
854+ so forth. Unknown escapes of ASCII letters are reserved for future use and
855+ treated as errors. Other unknown escapes such as ``\& `` are left alone.
856+ Backreferences, such
854857 as ``\6 ``, are replaced with the substring matched by group 6 in the pattern.
855858 For example::
856859
You can’t perform that action at this time.
0 commit comments