Evaluate escaped string

前端 未结 5 700
-上瘾入骨i
-上瘾入骨i 2021-01-13 06:50

I have some strings in a file that are already escaped. So the content of the file looks like this:

Hello\\nWorld. This is\\tGreat.

When I

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-13 07:12

    You can try using System.Text.RegularExpressions.Regex.Unescape.

    There's also an entry on the MSDN forums.

    See also How can I Unescape and Reescape strings in .net? .

提交回复
热议问题