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 serhiy.storchaka
Recipients THRlWiTi, aleskva, ezio.melotti, mrabarnett, serhiy.storchaka
Date 2018-05-28.08:16:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
This is not trivial task because inline flags with global scope can be occurred in any part of the pattern (although using them not at the start of the pattern is deprecated).

But starting with 3.7 you can use inline flags with local scope. This will allow you to use simple string concatenation.

pats = [r'(?m:^line.continues$)', r'(?s:begin.*?end)']
History
Date User Action Args
2018-05-28 08:16:03serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti, mrabarnett, THRlWiTi, aleskva
2018-05-28 08:16:03serhiy.storchakasetmessageid: <[email protected]>
2018-05-28 08:16:03serhiy.storchakalinkissue33658 messages
2018-05-28 08:16:03serhiy.storchakacreate