From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 5 Apr 2022 03:11:36 +0000 (-0700) Subject: bpo-32658: Regex docs: Fix metacharacter reference (GH-32230) X-Git-Tag: v3.9.13~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31c9e35e5360ba91fc6b81b23eb21dd3c39e2257;p=thirdparty%2FPython%2Fcpython.git bpo-32658: Regex docs: Fix metacharacter reference (GH-32230) Co-authored-by: Jelle Zijlstra (cherry picked from commit 43571a3eea8b5931769376daf4bdad1c9184ae0d) Co-authored-by: Mike cm --- diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst index d574c3736b1c..c4ebbd311e0f 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.