aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Doc/library/re.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r--Doc/library/re.rst12
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index a91bac53fb4..0ee2d68bcbe 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -266,7 +266,7 @@ The special characters are:
not a word boundary as outside a set, and numeric escapes
such as ``\1`` are always octal escapes, not group references.
Special sequences which do not match a single character such as ``\A``
- and ``\Z`` are not allowed.
+ and ``\z`` are not allowed.
.. index:: single: ^ (caret); in regular expressions
@@ -661,11 +661,17 @@ character ``'$'``.
matches characters which are neither alphanumeric in the current locale
nor the underscore.
-.. index:: single: \Z; in regular expressions
+.. index:: single: \z; in regular expressions
+ single: \Z; in regular expressions
-``\Z``
+``\z``
Matches only at the end of the string.
+ .. versionadded:: next
+
+``\Z``
+ The same as ``\z``. For compatibility with old Python versions.
+
.. index::
single: \a; in regular expressions
single: \b; in regular expressions