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 /Misc | |
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 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst b/Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst new file mode 100644 index 0000000..a1d4fc8 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst @@ -0,0 +1,4 @@ +Fix a bug in matching regular expression ``\B`` in empty input string. +Now it is always the opposite of ``\b``. +To get an old behavior, use ``(?!\A\Z)\B``. +To get a new behavior in old Python versions, use ``(?!\b)``. |