bigbigxiao
 String s = "xxxx.js.jss";//目标字符串
        String regex = "((?!\\.((css)|(html)|(js)|(json)|(xml))$).)+";//正则表达式
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(s);
        if (m.matches()) {
            System.out.println("匹配");
        } else {
            System.out.println("不匹配");
        }

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案