Isn't this the same as just using re.sub because you're not keeping the compiled object around?