Fix regex replacements for models where global flags were put at the end of the pattern strings. These patterns are invalid as of Python 3.11. This only applies to models which were created with earlier Calamari 1.x versions that had this kind of regular expression patterns in their defaults.
This PR also reverts @andbue's previous commit which only applied to the default text regularizer parameters - which do not have this issue anymore. @andbue: Hope this is OK for you!
Fix regex replacements for models where global flags were put at the end of the pattern strings. These patterns are invalid as of Python 3.11. This only applies to models which were created with earlier Calamari 1.x versions that had this kind of regular expression patterns in their defaults.
This PR also reverts @andbue's previous commit which only applied to the default text regularizer parameters - which do not have this issue anymore. @andbue: Hope this is OK for you!
Fixes #348.