What would be the syntax if I want to insert "0" after the first group reference ?
import re
re.sub("(..)(..)", "\\1x\\2", "toto")
toxto
re.sub("(..)(..)", "\\10\\2", "toto")
sre_constants.error: invalid group reference
Error, because \10 is interpreted as 10th reference group (that's why in ed(), group references are in [1-9] interval).
In the example above, how to obtain "to0to" ?