The 4th argument of re.sub() is maximum number of substitutions, not flags. Moreover, re.MULTILINE affects only semantics of ^ and $, so it wouldn't have any effect on this regular expression.
The 4th argument of re.sub() is maximum number of substitutions, not flags. Moreover, re.MULTILINE affects only semantics of ^ and $, so it wouldn't have any effect on this regular expression.