diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2025-01-02 12:11:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-02 12:11:21 (GMT) |
commit | a3711d1541c1b7987941b41d2247f87dae347117 (patch) | |
tree | d335b8acd65d95bfc8808f49823619d3c1b9d970 /Doc/library | |
parent | 8d16919a06a55a50756bf083221a6f6cab43de50 (diff) | |
download | cpython-a3711d1541c1b7987941b41d2247f87dae347117.zip cpython-a3711d1541c1b7987941b41d2247f87dae347117.tar.gz cpython-a3711d1541c1b7987941b41d2247f87dae347117.tar.bz2 |
gh-124130: Fix a bug in matching regular expression \B in empty string (GH-127007)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/re.rst | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 9db6f1d..29387a4 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -572,11 +572,8 @@ 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. + .. versionchanged:: next + ``\B`` now matches empty input string. .. index:: single: \d; in regular expressions |