0
我需要从imagepth
字符串变量删除\
字符:删除转义字符“”从字符串
imagepth = "# Eval(\"Name\",\"Gallary/\"" + imgwords[4] + "\"/Images/{0}\")";
我需要从imagepth
字符串变量删除\
字符:删除转义字符“”从字符串
imagepth = "# Eval(\"Name\",\"Gallary/\"" + imgwords[4] + "\"/Images/{0}\")";
正则表达式UNESCAPE将从字符串中删除所有的转义字符,这里是一个链接到这样的信息:
http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.unescape.aspx
您可以使用替换法用一个空字符串
012更换
我不确定我是否理解。据我所知,imagepth在赋值后不会包含单个反斜杠。 –
反斜杠转义引号,所以这些不会在'imagepth'中结束。你的意思是替换'/'而不是? –