patched re.compile passing for faster uploading