s = re.sub(r"(\d+)", r"Number is: \1", text)
Note that it’s not possible to use r"\0" to reference the whole capture. r"\0" means character code 0, or null character.
r"\0"
import re