mirror of https://github.com/python/cpython
[3.13] gh-118508: Clarify which characters are matched by `\s` (GH-119155) (#123670)
gh-118508: Clarify which characters are matched by `\s` (GH-119155)
Clarify re syntax
(cherry picked from commit 22fdb8cf89
)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
This commit is contained in:
parent
ad944b5e1f
commit
3b37658646
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue