给定一个字符串去匹配字符串数组,优先匹配到最接近的字符串值。 例如: str="heehello" arr = {"hello","ehello","eehello","hall"}
按最大匹配原则,优先匹配到eehello,其次到ehllo,最后匹配到hello。