[Python-checkins] bpo-32658: Regex docs: Fix metacharacter reference (GH-32230)
miss-islington
webhook-mailer at python.org
Mon Apr 4 23:08:25 EDT 2022
https://github.com/python/cpython/commit/d95e072c419e40b0fb67b8cc8a84087c8a0276ee
commit: d95e072c419e40b0fb67b8cc8a84087c8a0276ee
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-04-04T20:08:17-07:00
summary:
bpo-32658: Regex docs: Fix metacharacter reference (GH-32230)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra at gmail.com>
(cherry picked from commit 43571a3eea8b5931769376daf4bdad1c9184ae0d)
Co-authored-by: Mike cm <mikecmcleod at gmail.com>
files:
M Doc/howto/regex.rst
diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst
index d574c3736b1cb..c4ebbd311e0fe 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