>>> re.split("(?m)^$", "foo\n\nbar\n")
['foo\n\nbar\n']
- .. versionchanged:: 2.7,3.1
+ .. versionchanged:: 2.7
Added the optional flags argument.
character ``'0'``. The backreference ``\g<0>`` substitutes in the entire
substring matched by the RE.
- .. versionchanged:: 2.7,3.1
+ .. versionchanged:: 2.7
Added the optional flags argument.
Perform the same operation as :func:`sub`, but return a tuple ``(new_string,
number_of_subs_made)``.
- .. versionchanged:: 2.7,3.1
+ .. versionchanged:: 2.7
Added the optional flags argument.