Reputation: 29
I need to remove \
character from imagepth
string variable:
imagepth = "# Eval(\"Name\",\"Gallary/\"" + imgwords[4] + "\"/Images/{0}\")";
Upvotes: 2
Views: 27618
Reputation: 73
Here is a working syntax for me:
str = str.Replace("\"", string.Empty);
Upvotes: 1
Reputation: 713
You can use Replace method to replace "\\"
with a empty string
str = str.Replace("\\", "");
Upvotes: 6
Reputation: 541
Regex Unescape will remove all escaping characters from a string, here is a link to this information:
http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.unescape.aspx
Upvotes: 2