mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.12] gh-124130: Notes on empty string corner case of category \B (GH-124133) (#124329)
gh-124130: Notes on empty string corner case of category `\B` (GH-124133)
(cherry picked from commit d3e79d75d1)
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
7d505fecc9
commit
d5aafe7713
1 changed files with 6 additions and 0 deletions
|
|
@ -572,6 +572,12 @@ character ``'$'``.
|
|||
Word boundaries are determined by the current locale
|
||||
if the :py:const:`~re.LOCALE` flag is used.
|
||||
|
||||
.. note::
|
||||
|
||||
Note that ``\B`` does not match an empty string, which differs from
|
||||
RE implementations in other programming languages such as Perl.
|
||||
This behavior is kept for compatibility reasons.
|
||||
|
||||
.. index:: single: \d; in regular expressions
|
||||
|
||||
``\d``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue