Skip to content

Commit

Permalink
pythongh-118508: Clarify which characters are matched by \s (python…
Browse files Browse the repository at this point in the history
…#119155)

Clarify re syntax
  • Loading branch information
nineteendo authored Sep 2, 2024
1 parent 23f159a commit 22fdb8c
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 22fdb8c

Please sign in to comment.