Iteratively find the best possible match from regex/strings.