如何替换\

以前也经常遇到这个问题,但是没有找到解决方案,今天再次遇到这个问题,搜索了下没有什么头绪,很多答案试验了下都是错误的,不得已,自己试吧,最终的结果是:
replaceAll("\\\\", "\\\\\\\\")
就是把字符串中的\替换成两个\,呵呵,变态吧。


作者: Cherami
原载: 如何替换\
版权所有。转载时必须以链接形式注明作者和原始出处及本声明。

日志评价

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (暂无评价) --点击星星直接投票
Loading ... Loading ...


相关日志

  • 暂时没有相关日志。


随机日志



添加到网摘

[del.icio.us]  [新浪 VIVI]  [365key]  [YouNote]  [博采中心]  [Poco]  [SOHU狐摘]  [天极网摘]  [和讯网摘]
喜欢这个插件?

当前日志信息