When using re.sub , how do you deal with a situation where you need a capture followed by a number in the replacement string? For example, you cannot use "\ 10" for capture 1, followed by the character "0", because it will be interpreted as capture 10.
source
share