mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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.
This commit is contained in:
parent
fe44fc4f43
commit
ac56f8cc8d
8 changed files with 31 additions and 10 deletions
|
@ -61,7 +61,7 @@ below. If the ordinary character is not on the list, then the
|
|||
resulting RE will match the second character.
|
||||
\number Matches the contents of the group of the same number.
|
||||
\A Matches only at the start of the string.
|
||||
\Z Matches only at the end of the string.
|
||||
\z Matches only at the end of the string.
|
||||
\b Matches the empty string, but only at the start or end of a word.
|
||||
\B Matches the empty string, but not at the start or end of a word.
|
||||
\d Matches any decimal digit; equivalent to the set [0-9] in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue