[docs] I am Sai Akshay Erupaka I found an mistake in the documentation in the regular expressions part

Sai Akshay Erupaka saiakshay72 at gmail.com
Tue Aug 13 12:06:02 EDT 2019


Regular expressions



*?, +?, ??

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 '<a> b <c>', it will match the entire string, and not just '<a>'.
Adding ? after the qualifier makes it perform the match in non-greedy or
minimal fashion; as few characters as possible will be matched. Using the
RE <.*?> will match only '<a>'.

It says that the RE <.*?> matches only <a> but it also matches <c>




 I am also attaching the pdf document with the same content
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20190813/11ff2441/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Python documenataion bug-converted.pdf
Type: application/pdf
Size: 94759 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20190813/11ff2441/attachment-0001.pdf>


More information about the docs mailing list