Skip to content

Commit 0af247d

Browse files
wulmerAlexWaygood
andauthored
gh-102111: Add link to string escape sequences in re module (#106995)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 9eeb4b4 commit 0af247d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Doc/library/re.rst

+2-2
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

+4
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)