]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-102111: Add link to string escape sequences in re module (#106995)
authorwulmer <wulmer@users.noreply.github.com>
Sun, 23 Jul 2023 08:50:38 +0000 (10:50 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Jul 2023 08:50:38 +0000 (02:50 -0600)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Doc/library/re.rst
Doc/reference/lexical_analysis.rst

index 629ee472cca681aa8bfe88961d22c39a2800b59c..3f03f0341d81661a0ba20bf9885852ce90bb09e8 100644 (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
index 47062f86810e91374e6f8c3ca72dafbd9137cace..dde7ba1d941dce64327a0e96a403cccfa087018a 100644 (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: