Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
Replace backslash with double backslash using Regex
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
mmilligan
20y
15.9k
1
Reply
I want to replace single back slashes in a string with double back slashes. This is for a database string I pass into an API method call. The following causes a run-time error: public static string setDoubleFSlash(string sPath) { return Regex.Replace(sPath,"\\","\\\\"); } Now I use an extra back slash to escape the actual back slash. HELP!
[email protected]
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Printer Fonts
Working with Multithreaded programming!