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 tdawes
Recipients ezio.melotti, mrabarnett, tdawes
Date 2018-10-02.21:29:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538515754.54.0.545547206417.issue34873@psf.upfronthosting.co.za>
In-reply-to
Content
re.finditer appears to fail to match within the first 7 characters in a string when re.MULTILINE is used:

>>> REGEX = re.compile("y")
>>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i), re.MULTILINE)) for i in range(10)]
[[], [], [], [], [], [], [], [], [8], [9]]

Without re.MULTILINE, this works fine:

>>> [list(m.start() for m in REGEX.finditer("{}y".format("x"*i))) for i in range(10)]
[[0], [1], [2], [3], [4], [5], [6], [7], [8], [9]]

Passing re.MULTILINE to re.compile doesn't seem to have any effect.
History
Date User Action Args
2018-10-02 21:29:14tdawessetrecipients: + tdawes, ezio.melotti, mrabarnett
2018-10-02 21:29:14tdawessetmessageid: <1538515754.54.0.545547206417.issue34873@psf.upfronthosting.co.za>
2018-10-02 21:29:14tdaweslinkissue34873 messages
2018-10-02 21:29:14tdawescreate