java 替换字符串中的中括号
时间:2015-12-03 20:51:14
收藏:0
阅读:321
正确方式:
"[adbdesf]".replaceAll("\\[", "").replaceAll("\\]", "")
错误方式:
"[adbdesf]".replaceAll("[", "").replaceAll("]", "")
"[adbdesf]".replaceAll("\[", "").replaceAll("\]", "")
原文:http://www.cnblogs.com/liaojie970/p/5017417.html
评论(0)