diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-12-20 03:14:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 03:14:48 (GMT) |
commit | b81d1c3be360c5f9a9dff0761e7f1f70a200f0aa (patch) | |
tree | 0e78fa99ae60c904d6aea66ad72a35edb5c14c65 /Doc/library/re.rst | |
parent | e38a525c20f0fe68cfade983a472a1f011d5e3df (diff) | |
download | cpython-b81d1c3be360c5f9a9dff0761e7f1f70a200f0aa.zip cpython-b81d1c3be360c5f9a9dff0761e7f1f70a200f0aa.tar.gz cpython-b81d1c3be360c5f9a9dff0761e7f1f70a200f0aa.tar.bz2 |
gh-69929: re docs: Add more specific definition of \w (GH-92015)
(cherry picked from commit 36a0b1d0dddbdf324d98071ea31e7e9151eea6d5)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index a40c99b..716d340 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -526,10 +526,9 @@ character ``'$'``. ``\w`` For Unicode (str) patterns: - Matches Unicode word characters; this includes most characters - that can be part of a word in any language, as well as numbers and - the underscore. If the :const:`ASCII` flag is used, only - ``[a-zA-Z0-9_]`` is matched. + Matches Unicode word characters; this includes alphanumeric characters (as defined by :meth:`str.isalnum`) + as well as the underscore (``_``). + If the :const:`ASCII` flag is used, only ``[a-zA-Z0-9_]`` is matched. For 8-bit (bytes) patterns: Matches characters considered alphanumeric in the ASCII character set; |