Add more condition into re.sub.
Remove make_counter.