Skip to content

Commit a180a47

Browse files
wulmerAlexWaygood
authored andcommitted
pythongh-102111: Add link to string escape sequences in re module (python#106995)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent 24d12aa commit a180a47

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Doc/library/re.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ character ``'$'``.
634634
single: \x; in regular expressions
635635
single: \\; in regular expressions
636636

637-
Most of the standard escapes supported by Python string literals are also
638-
accepted by the regular expression parser::
637+
Most of the :ref:`escape sequences <escape-sequences>` supported by Python
638+
string literals are also accepted by the regular expression parser::
639639

640640
\a \b \f \n
641641
\N \r \t \u

Doc/reference/lexical_analysis.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,10 @@ retained), except that three unescaped quotes in a row terminate the literal. (
549549

550550
.. _escape-sequences:
551551

552+
553+
Escape sequences
554+
^^^^^^^^^^^^^^^^
555+
552556
Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string and
553557
bytes literals are interpreted according to rules similar to those used by
554558
Standard C. The recognized escape sequences are:

0 commit comments

Comments
 (0)