bootstrap 模态框modal 传值问题
765 2023-04-03 02:00:27
// 第一种:直接用正则,(?!)表示整体忽略大小写,如果单个,则可以写成"^d(?!)oc"表示oc忽略大小写,"^d((?!)o)c"表示只有o忽略大小写String regex1 = "^(?i)doc$";// 第二种,采用Patter编译忽略大小写String regex = "^doc$";String s = "DoC";System.out.println(s.matches(regex1)); //truePattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);System.out.println(p.matcher(s).matches()); //true