This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bsammon
Recipients 4wayned, WayneD, bsammon, ezio.melotti, mrabarnett
Date 2021-09-22.18:18:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632334735.81.0.132845563859.issue40027@roundup.psfhosted.org>
In-reply-to
Content
txt = ' test'
txt = re.sub(r'^\s*', '^', txt)

substitutes once because the * is greedy.

txt = ' test'
txt = re.sub(r'^\s*?', '^', txt)

substitutes twice, consistent with the \Z behavior.
History
Date User Action Args
2021-09-22 18:18:55bsammonsetrecipients: + bsammon, ezio.melotti, mrabarnett, WayneD, 4wayned
2021-09-22 18:18:55bsammonsetmessageid: <1632334735.81.0.132845563859.issue40027@roundup.psfhosted.org>
2021-09-22 18:18:55bsammonlinkissue40027 messages
2021-09-22 18:18:55bsammoncreate