0x00
level: 0x04
0x01
code:
1 // (lrrq或rq或date)或(yqsl或sl)与(yqdm或ypmc)与 (ysgk或ysdm)与sum与group 2 3 String regex = "((?=.*(lrrq|rq|date))|(?=.*(yqsl|sl)))(?=.*(yqdm|ypmc))(?=.*(ysgk|ysdm))(?=.*sum)(?=.*group).*"; 4 String str = "select sl , yqdm , ysgk sum(ssd) table1 group by ddffd"; 5 6 Pattern p = Pattern.compile(regex); 7 Matcher m = p.matcher(str); 8 9 System.out.println(m.matches());
0x02
?= 必须; ?! 排除; | 或者