#python is match bool(re.search("(abc)",input)) prog = re.compile(f'({refkey})') bool(re.search("abc"))