Java中用正则表达式截取“()”之间的内容

Pattern pattern = Pattern.compile("(?<=\\()(.+?)(?=\\))");
Matcher matcher = pattern.matcher(匹配的内容);
while(matcher.find()){
      返回的数据= matcher.group();
 }

猜你喜欢

转载自blog.csdn.net/qq_35023116/article/details/81118948
今日推荐