Groovy:用\替换/在路径中

Boo*_*eoo 4 groovy escaping slash backslash

你会如何/\Groovy 替换?这就 "//10.1.1.1/temp/test"变成了"\\10.1.1.1\temp\test".

"//10.1.1.1/temp/test".replaceAll(/'\\/'/,'\\')< - ?不起作用

有没有人有想法?

谢谢你的回答.

ems*_*tol 11

看看这个"//10.1.1.1/temp/test".replaceAll("/","\\\\")."\\\\"做出一个反斜杠.