diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-09-02 11:48:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 11:48:15 (GMT) |
commit | 22fdb8cf899d2dd29f2ac0bf61309af6809719fb (patch) | |
tree | 892684065f49b5ac37284c580969925603775dd4 | |
parent | 23f159ae711d84177e8ce34cd9a6c8a762de64ac (diff) | |
download | cpython-22fdb8cf899d2dd29f2ac0bf61309af6809719fb.zip cpython-22fdb8cf899d2dd29f2ac0bf61309af6809719fb.tar.gz cpython-22fdb8cf899d2dd29f2ac0bf61309af6809719fb.tar.bz2 |
gh-118508: Clarify which characters are matched by `\s` (#119155)
Clarify re syntax
-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 cc979fe..efb2722 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -600,10 +600,9 @@ character ``'$'``. ``\s`` For Unicode (str) patterns: - Matches Unicode whitespace characters (which includes - ``[ \t\n\r\f\v]``, and also many other characters, for example the - non-breaking spaces mandated by typography rules in many - languages). + Matches Unicode whitespace characters (as defined by :py:meth:`str.isspace`). + This includes ``[ \t\n\r\f\v]``, and also many other characters, for example the + non-breaking spaces mandated by typography rules in many languages. Matches ``[ \t\n\r\f\v]`` if the :py:const:`~re.ASCII` flag is used. |