8000 [3.12] gh-118508: Clarify which characters are matched by `\s` (GH-11… · python/cpython@a0c9f51 · GitHub
[go: up one dir, main page]

Skip to content

Commit a0c9f51

Browse files
[3.12] gh-118508: Clarify which characters are matched by \s (GH-119155) (#123671)
gh-118508: Clarify which characters are matched by `\s` (GH-119155) Clarify re syntax (cherry picked from commit 22fdb8c) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
1 parent e75ecd0 commit a0c9f51

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/re.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,9 @@ character ``'$'``.
600600

601601
``\s``
602602
For Unicode (str) patterns:
603-
Matches Unicode whitespace characters (which includes
604-
``[ \t\n\r\f\v]``, and also many other characters, for example the
605-
non-breaking spaces mandated by typography rules in many
606-
languages).
603+
Matches Unicode whitespace characters (as defined by :py:meth:`str.isspace`).
604+
This includes ``[ \t\n\r\f\v]``, and also many other characters, for example the
605+
non-breaking spaces mandated by typography rules in many languages.
607606

608607
Matches ``[ \t\n\r\f\v]`` if the :py:const:`~re.ASCII` flag is used.
609608

0 commit comments

Comments
 (0)
0