[docs] Tiny doc bug

Robert Kinstler r_kinstler at comcast.net
Tue Apr 23 23:06:10 CEST 2013


Ignore that bug report.  I did not pay attention to the phrase, "in the
previous expression".  Of course, presuming that I am a normal reader,
maybe rephrasing that sentence will prevent others from being confused
as well.
Thanks for your documentation work.  I'm standing on your shoulders when
I do my job.

Robert

On 4/23/2013 4:59 PM, Robert Kinstler wrote:
> In http://docs.python.org/2/library/re.html I think that the last
> regular expression in the paragraph quoted below is missing the '<'
> and '>'.  It is supposed to be the non-greedy version of "<.*>",
> right?  (I am writing my string literals as they are written in "C"
> source code.)
>
> The '*', '+', and '?' qualifiers are all /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
> perform the match in /non-greedy/ or /minimal/ fashion; as /few/
> characters as possible will be matched. Using .*? in the previous
> expression will match only '<H1>'.
>
> Thanks for reading this.
>
> Robert Kinstler
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130423/b41fbe8b/attachment-0001.html>


More information about the docs mailing list