Upload text_utils.py with huggingface_hub
Browse files123 unmodified lines124125126127128129130131123 unmodified lines else: result.append(str(item)) return "_".join(result)
def is_made_of_sub_strings(string, sub_strings): pattern = "^(" + "|".join(map(re.escape, sub_strings)) + ")+$" return bool(re.match(pattern, string))text_utils.py+5