Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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)']

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33658>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to