re.subn(pattern, repl, string, count=0, flags=0)
Perform the same operation as sub()
, but return a tuple (new_string,
number_of_subs_made)
.
Changed in version 3.1: Added the optional flags argument.
Changed in version 3.5: Unmatched groups are replaced with an empty string.
Please login to continue.