[Python-checkins] cpython (merge 3.6 -> default): Issue #27800: Merge RE repetition doc from 3.6
martin.panter
python-checkins at python.org
Fri Oct 14 21:45:31 EDT 2016
https://hg.python.org/cpython/rev/98456ab88ab0
changeset: 104502:98456ab88ab0
parent: 104499:1955dcc27332
parent: 104501:1f2ca7e4b64e
user: Martin Panter <vadmium+py at gmail.com>
date: Sat Oct 15 01:39:21 2016 +0000
summary:
Issue #27800: Merge RE repetition doc from 3.6
files:
Doc/library/re.rst | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -79,6 +79,12 @@
expression pattern strings may not contain null bytes, but can specify
the null byte using a ``\number`` notation such as ``'\x00'``.
+Repetition qualifiers (``*``, ``+``, ``?``, ``{m,n}``, etc) cannot be
+directly nested. This avoids ambiguity with the non-greedy modifier suffix
+``?``, and with other modifiers in other implementations. To apply a second
+repetition to an inner repetition, parentheses may be used. For example,
+the expression ``(?:a{6})*`` matches any multiple of six ``'a'`` characters.
+
The special characters are:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list