【发布时间】:2014-04-26 21:47:14
【问题描述】:
如何删除侧面有空格的特殊字符。
String webcontent = "This is my string. i got this string from blabla.com."
当我使用这个正则表达式时
webcontent.replaceAll("[-.:,+^]*", "");
变成这样
String webcontent = "This is my string i got this string from blablacom"
我想要的不好
"This is my string i got this string from blabla.com"
【问题讨论】: