diff options
author | Georg Brandl <georg@python.org> | 2016-04-12 05:52:22 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2016-04-12 05:52:22 (GMT) |
commit | 2cfa4c7b27c1d860b5c743fc65322d62ac07d2d3 (patch) | |
tree | 00074a6a87a1475df74126149b380a0a1558217d /Doc/library | |
parent | 2940255df2600d5f5bc8b24c7f33fcb7e4e46f67 (diff) | |
parent | 7ff033bd6251625ef6da4ab9ec6259c34fbf3f8d (diff) | |
download | cpython-2cfa4c7b27c1d860b5c743fc65322d62ac07d2d3.zip cpython-2cfa4c7b27c1d860b5c743fc65322d62ac07d2d3.tar.gz cpython-2cfa4c7b27c1d860b5c743fc65322d62ac07d2d3.tar.bz2 |
merge with 3.5
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/re.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 75059cd..1df768c 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -113,11 +113,11 @@ The special characters are: ``*?``, ``+?``, ``??`` The ``'*'``, ``'+'``, and ``'?'`` qualifiers are all :dfn:`greedy`; they match as much text as possible. Sometimes this behaviour isn't desired; if the RE - ``<.*>`` is matched against ``'<H1>title</H1>'``, it will match the entire - string, and not just ``'<H1>'``. Adding ``'?'`` after the qualifier makes it + ``<.*>`` is matched against ``<a> b <c>``, it will match the entire + string, and not just ``<a>``. Adding ``?`` after the qualifier makes it perform the match in :dfn:`non-greedy` or :dfn:`minimal` fashion; as *few* - characters as possible will be matched. Using ``.*?`` in the previous - expression will match only ``'<H1>'``. + characters as possible will be matched. Using the RE ``<.*?>`` will match + only ``<a>``. ``{m}`` Specifies that exactly *m* copies of the previous RE should be matched; fewer |