gh-102111: Add link to string escape sequences in re module (#106995)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
wulmer 2023-07-23 10:50:38 +02:00 committed by GitHub
parent 9eeb4b485f
commit 0af247da09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -634,8 +634,8 @@ character ``'$'``.
single: \x; in regular expressions
single: \\; in regular expressions
Most of the standard escapes supported by Python string literals are also
accepted by the regular expression parser::
Most of the :ref:`escape sequences <escape-sequences>` supported by Python
string literals are also accepted by the regular expression parser::
\a \b \f \n
\N \r \t \u

View file

@ -549,6 +549,10 @@ retained), except that three unescaped quotes in a row terminate the literal. (
.. _escape-sequences:
Escape sequences
^^^^^^^^^^^^^^^^
Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string and
bytes literals are interpreted according to rules similar to those used by
Standard C. The recognized escape sequences are: