Skip to content

Commit

Permalink
[3.13] gh-118508: Clarify which characters are matched by \s (GH-11…
Browse files Browse the repository at this point in the history
…9155) (#123670)

gh-118508: Clarify which characters are matched by `\s` (GH-119155)

Clarify re syntax
(cherry picked from commit 22fdb8c)

Co-authored-by: Nice Zombies <[email protected]>
  • Loading branch information
miss-islington and nineteendo authored Sep 4, 2024
1 parent ad944b5 commit 3b37658
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Doc/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 3b37658

Please sign in to comment.