当前位置:编程学习 > JAVA >>

正则表达式

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());
 

补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,