restructured str_match, start regex