Mod: add regex replace to encode_uri

Some internal API will have tweet ID or user ID in request URI. This
regex replace support will allow better match of these APIs.