Replace backslash with double backslash using Regex
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]
uzirPosted Jan 12, 2004, 8:32 AM
uzirPosted Jan 12, 2004, 8:31 AM
mmilliganPosted Jan 10, 2004, 9:30 PM
uzirPosted Jan 10, 2004, 7:24 AM