String regEx=":[\\S]+";
String sql=" select * from a where id=:id and name=:zhangsan ";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(sql);
while(m.find()) {
System.out.println(m.group());
}
java 获取冒号后面的参数(正则)
最新推荐文章于 2023-08-10 08:12:35 发布