]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 3 May 2025 07:54:33 +0000 (10:54 +0300)
committerGitHub <noreply@github.com>
Sat, 3 May 2025 07:54:33 +0000 (07:54 +0000)
commitac56f8cc8d36ed65228d7eaa245569f66ad16d2b
treedf55479b804c88943859cbec21bf7b68d8be649c
parentfe44fc4f4351bb4b457c01d94b4ae8b9eda501aa
gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314)

\Z was an error inherited from PCRE 0.95. It was fixed in PCRE 2.0.
In other engines, \Z means not “anchor at string end”, but
“anchor before optional newline at string end”.

\z means “anchor at string end” in most RE engines.
Doc/howto/regex.rst
Doc/library/re.rst
Doc/whatsnew/3.14.rst
Lib/re/__init__.py
Lib/re/_parser.py
Lib/test/re_tests.py
Lib/test/test_re.py
Misc/NEWS.d/next/Library/2025-05-02-21-35-03.gh-issue-133306.-vBye5.rst [new file with mode: 0644]