假设要匹配${2}中间为数字的这个类型的变量String,则

Pattern p = Pattern.compile("\\$\\{\\d+\\}");
Matcher m = p.matcher(String);
boolean b = m.find();
while (b) {

  //后续操作……

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-12-31
  • 2021-08-16
  • 2021-12-15
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-05-24
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案