8000 gh-118508: Clarify which characters are matched by `\s` (#119155) · python/cpython@4998d01 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4998d01

Browse files
nineteendopull[bot]
authored andcommitted
gh-118508: Clarify which characters are matched by \s (#119155)
Clarify re syntax
1 parent 9878ca3 commit 4998d01

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