java使用正则表达式获取字符串中{}中的内容

Pattern pattern = Pattern.compile("(?<=\\{)(.+?)(?=\\})");

Matcher matcher = pattern.matcher(test);

猜你喜欢

转载自blog.csdn.net/weixin_43854096/article/details/84949948