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 获取冒号后面的参数(正则)
猜你喜欢
转载自blog.csdn.net/z793397795/article/details/83899953
今日推荐
周排行