java 字符串替换 替换[]中间内容

a = a.replaceAll("\\[(.*?)\\]", "[xx]")

也能够是: a = a.replaceAll(“(?<=\\[)(.*?)(?=\\])”, "xx");

相关文章
相关标签/搜索