diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-10-15 01:39:21 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-10-15 01:39:21 +0000 |
commit | 20e086efc7db911f7088440b17e52881cf53edda (patch) | |
tree | 709f0c7c85606908e3240ebce04d9977def576ae | |
parent | 8a42581bc2aae93353965153c6be313d6eb9e762 (diff) | |
parent | 479eb760f4dd5ae5cfc5ccf8a361cdea3d48624a (diff) | |
download | cpython-git-20e086efc7db911f7088440b17e52881cf53edda.tar.gz |
Issue #27800: Merge RE repetition doc from 3.6
-rw-r--r-- | Doc/library/re.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 8ffcd9a820..c9f2263375 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: |