[Python-checkins] bpo-32658: Regex docs: Fix metacharacter reference (GH-32230)

JelleZijlstra webhook-mailer at python.org
Mon Apr 4 22:47:15 EDT 2022


https://github.com/python/cpython/commit/43571a3eea8b5931769376daf4bdad1c9184ae0d
commit: 43571a3eea8b5931769376daf4bdad1c9184ae0d
branch: main
author: Mike cm <mikecmcleod at gmail.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2022-04-04T19:46:54-07:00
summary:

bpo-32658: Regex docs: Fix metacharacter reference (GH-32230)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra at gmail.com>

files:
M Doc/howto/regex.rst

diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst
index 33dca2fc41f9d..c4eed8fb1fbe7 100644
--- a/Doc/howto/regex.rst
+++ b/Doc/howto/regex.rst
@@ -89,7 +89,7 @@ is the same as ``[a-c]``, which uses a range to express the same set of
 characters.  If you wanted to match only lowercase letters, your RE would be
 ``[a-z]``.
 
-Metacharacters are not active inside classes.  For example, ``[akm$]`` will
+Metacharacters (except ``\``) are not active inside classes.  For example, ``[akm$]`` will
 match any of the characters ``'a'``, ``'k'``, ``'m'``, or ``'$'``; ``'$'`` is
 usually a metacharacter, but inside a character class it's stripped of its
 special nature.



More information about the Python-checkins mailing list