From 7ff033bd6251625ef6da4ab9ec6259c34fbf3f8d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 12 Apr 2016 07:51:41 +0200 Subject: [PATCH] Clarify greedy-qualifier example, avoid HTML. --- Doc/library/re.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 75059cda7cfd3e..1df768c3287a58 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 ``'

title

'``, it will match the entire - string, and not just ``'

'``. Adding ``'?'`` after the qualifier makes it + ``<.*>`` is matched against `` b ``, it will match the entire + string, and not just ````. 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 ``'

'``. + characters as possible will be matched. Using the RE ``<.*?>`` will match + only ````. ``{m}`` Specifies that exactly *m* copies of the previous RE should be matched; fewer