Author mrabarnett
Recipients bayat, ezio.melotti, mrabarnett
Date 2020-09-11.18:10:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599847833.86.0.677813750366.issue41764@roundup.psfhosted.org>
In-reply-to
Content
The arguments are: re.sub(pattern, repl, string, count=0, flags=0).

Therefore:

    re.sub("pattern","replace", txt, re.IGNORECASE | re.DOTALL)

is passing re.IGNORECASE | re.DOTALL as the count, not the flags.

It's in the documentation and the interactive help.
History
Date User Action Args
2020-09-11 18:10:33mrabarnettsetrecipients: + mrabarnett, ezio.melotti, bayat
2020-09-11 18:10:33mrabarnettsetmessageid: <1599847833.86.0.677813750366.issue41764@roundup.psfhosted.org>
2020-09-11 18:10:33mrabarnettlinkissue41764 messages
2020-09-11 18:10:33mrabarnettcreate