我现在有这样一个字符串
,我想把这个给替换成空字符串,但是:"x-msg://1/"里面的数字1是不确定的,也有可能是108,比如,求大神给写个正则表达式,6条回答
- YanLeiSheng 2015-10-09 03:52关注
public static void main(String[] args) {
String source = "first {test} is here,two {test2} is here!";
String find = "\u007B.*\u007D";
Pattern pattern = Pattern.compile(find);
Matcher matcher = pattern.matcher(source);
while(matcher.find()) {
System.out.println(matcher.group());
}
}解决 无用评论 打赏 举报
悬赏问题
- ¥20 求一个html代码,有偿
- ¥100 关于使用MATLAB中copularnd函数的问题
- ¥20 在虚拟机的pycharm上
- ¥15 jupyterthemes 设置完毕后没有效果
- ¥15 matlab图像高斯低通滤波
- ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
- ¥15 钢筋实图交点识别,机器视觉代码
- ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
- ¥50 400g qsfp 光模块iphy方案
- ¥15 两块ADC0804用proteus仿真时,出现异常