def _get_regex_for_type(type_name): field_type = get_field_type(type_name) return field_type.regex.replace('\\', '\\\\')