首页 > 安全资讯 >

正则表达式

11-07-21

String regString = "sql\\('select(

String regString = "sql\\('select(\\s*\\w*\\s*\\w*\\s*)*','\\w*'\\)";
  Pattern ptn = Pattern.compile(regString, Pattern.CASE_INSENSITIVE);
  String s = "<set label='spring' value='sql('select id from tableName','dataBase')'/>";
  Matcher matcher = ptn.matcher(s);
  System.out.println(matcher.find());
 

相关文章
最新文章
热点推荐