Implement "match_prefix", "match_regex", "match_similar" commands