/**
 * 检测 originText 是否包含  includeText
 * @param originText 要检测的字符串
 * @param includeText 是否包含该字符串
 * @return true,即包包含,false则不包含
 */ 
public boolean checkCarrier(String originText,String includeText){
    Pattern pattern = Pattern.compile(includeText,Pattern.CASE_INSENSITIVE); // 不区分大小写
    Matcher matcher = pattern.matcher(originText);
    boolean result = matcher.find();
    return result;
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-01-06
  • 2022-12-23
  • 2022-02-06
相关资源
相似解决方案