public boolean checkMatchFNOrFI(String[] strArray,String value){ boolean flag = false; for(String s : strArray){ if(!s.equals("")){ String temp = s.replaceAll("\\?", "\\\\w").replaceAll("\\*", "\\\\w*"); flag = value.matches(temp); if(flag){ break; } } } return flag; }
字符串类似数据库Like匹配
时间: 2024-11-09 00:00:18