Issue #22493: Inline flags now should be used only at the start of the

regular expression.  Deprecation warning is emitted if uses them in the
middle of the regular expression.
This commit is contained in:
Serhiy Storchaka 2016-09-11 12:50:02 +03:00
parent 352601ca00
commit bd48d27944
12 changed files with 58 additions and 34 deletions

View file

@ -106,4 +106,4 @@ def translate(pat):
res = '%s[%s]' % (res, stuff)
else:
res = res + re.escape(c)
return res + r'\Z(?ms)'
return r'(?s:%s)\Z' % res