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 <1527495363.71.0.682650639539.issue33658@psf.upfronthosting.co.za>
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: <1527495363.71.0.682650639539.issue33658@psf.upfronthosting.co.za>
2018-05-28 08:16:03serhiy.storchakalinkissue33658 messages
2018-05-28 08:16:03serhiy.storchakacreate