I am using .NET code (C #) to write to a database that interacts with a Perl application. When a single quote appears in a string, I need to "escape" from it. IOW, the name O'Bannon must be converted to O\'Bannon for the UPDATE database. However, all string manipulation efforts (like Replace) generate an escape character for the backslash, and I end up O\\'Bannon .
I know that it actually generates a second backslash, because I can read the resulting value of the database field (i.e. this is not just an IDE debug value for the string).
How can I get only one backslash in the output string?
R
source share