String 正则匹配删除括号内的内容,包括括号

2020-07-28  本文已影响0人  YUTerry
String str = "你好(世界)";
str.replaceAll("[\\((][^\\))]+[\\))]","");
上一篇 下一篇

猜你喜欢

热点阅读