escaping – Unescaping strings in c# using string.Replace?

escaping – Unescaping strings in c# using string.Replace?

You can use Unescape

    var str = <category title=FOO>;
    var result = System.Text.RegularExpressions.Regex.Unescape(str);
    Console.WriteLine(result); //<category title=FOO>

    Console.ReadLine();

You can use Regex.Unescape Method to resolve.
https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.unescape(v=vs.110).aspx

Or you can use Uri.UnescapeDataString Method.

https://msdn.microsoft.com/en-in/library/system.uri.unescapedatastring(v=vs.110).aspx

escaping – Unescaping strings in c# using string.Replace?

Try Replace(\, ), or even better Replace(, )

Leave a Reply

Your email address will not be published. Required fields are marked *