Mar-19-2017, 07:56 AM
(This post was last modified: Mar-19-2017, 07:56 AM by saswatidas437.)
I have a need to replace single backslashes with double backslashes. I know that the replace method of the string object can be used, however I'm not able to figure out the correct combination given that the backslash serves as an escape character. Adding one more point below string is not constant below string i will read from a config file so i can't use python raw stringĀ r'\\[string]\[string]\[string]'
\\[string]\[string]\[string]
Needs to become
\\\\[string]\\[string]\\[string]
Example \\user\build\field to \\\\user\\build\\field
\\[string]\[string]\[string]
Needs to become
\\\\[string]\\[string]\\[string]
Example \\user\build\field to \\\\user\\build\\field