summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/howto/regex.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst
index c19c483..15372e7 100644
--- a/Doc/howto/regex.rst
+++ b/Doc/howto/regex.rst
@@ -245,6 +245,9 @@ You can omit either *m* or *n*; in that case, a reasonable value is assumed for
the missing value. Omitting *m* is interpreted as a lower limit of 0, while
omitting *n* results in an upper bound of infinity.
+The simplest case ``{m}`` matches the preceding item exactly **m** times.
+For example, ``a/{2}b`` will only match ``'a//b'``.
+
Readers of a reductionist bent may notice that the three other quantifiers can
all be expressed using this notation. ``{0,}`` is the same as ``*``, ``{1,}``
is equivalent to ``+``, and ``{0,1}`` is the same as ``?``. It's better to use