My bad, I misunderstood what re.sub does.