[Python-checkins] gh-102259: Fix re doc issue regarding right square brackets (#102264)

terryjreedy webhook-mailer at python.org
Sat Feb 25 21:22:24 EST 2023


https://github.com/python/cpython/commit/bcadcde7122f6d3d08b35671d67e105149371a2f
commit: bcadcde7122f6d3d08b35671d67e105149371a2f
branch: main
author: Skip Montanaro <skip.montanaro at gmail.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2023-02-25T21:22:16-05:00
summary:

gh-102259: Fix re doc issue regarding right square brackets (#102264)


Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
M Doc/library/re.rst

diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index d0a16b951844..b7510b93d754 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -271,7 +271,8 @@ The special characters are:
 
    * To match a literal ``']'`` inside a set, precede it with a backslash, or
      place it at the beginning of the set.  For example, both ``[()[\]{}]`` and
-     ``[]()[{}]`` will both match a parenthesis.
+     ``[]()[{}]`` will match a right bracket, as well as left bracket, braces,
+     and parentheses.
 
    .. .. index:: single: --; in regular expressions
    .. .. index:: single: &&; in regular expressions



More information about the Python-checkins mailing list