summaryrefslogtreecommitdiffstats
path: root/Doc/library/re.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-10-15 01:39:01 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-10-15 01:39:01 (GMT)
commit479eb760f4dd5ae5cfc5ccf8a361cdea3d48624a (patch)
tree24e7014ec782e06b07f8a6f96026b2fcde7025a3 /Doc/library/re.rst
parent36700e457840c2e80a99c2e3fe1eeaba336099e3 (diff)
parent684340ede58776d77a104c689e821d1eab36bf63 (diff)
downloadcpython-479eb760f4dd5ae5cfc5ccf8a361cdea3d48624a.zip
cpython-479eb760f4dd5ae5cfc5ccf8a361cdea3d48624a.tar.gz
cpython-479eb760f4dd5ae5cfc5ccf8a361cdea3d48624a.tar.bz2
Issue #27800: Merge RE repetition doc from 3.5 into 3.6
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r--Doc/library/re.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 8ffcd9a..c9f2263 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -79,6 +79,12 @@ how the regular expressions around them are interpreted. Regular
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: