How would you replace / with \ in Groovy? So that
"//10.1.1.1/temp/test" becomes "\\10.1.1.1\temp\test".
"//10.1.1.1/temp/test".replaceAll(/'\\/'/,'\\') <-- ? doesn't work
Does anyone have an idea?
Thanks for any answer.
Look at this "//10.1.1.1/temp/test".replaceAll("/","\\\\"). "\\\\" makes a single backslash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With