Change unnecessary re.sub to replace