首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

C# 中 如何把 \\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b 转换为 \x00\x00\x00\x00

2012-11-03 
C# 中 怎么把 \\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b 转换为 \x00\x00\x00\x00 求救 在线等C# 中 怎么

C# 中 怎么把 \\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b 转换为 \x00\x00\x00\x00 求救 在线等
C# 中 怎么把 \\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b 转换为 \x00\x00\x00\x00\xaa\x8f\x 求救 在线等

[解决办法]

C# code
string input = @"\\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b";System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(    @"\\(\\x[0-9a-f]{2})",    System.Text.RegularExpressions.RegexOptions.IgnoreCase);string output = reg.Replace(input,"$1");
[解决办法]
C# code
            string s = @"\\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b";            string r = s.Replace(@"\\x", @"\x");            Console.Write(r);            Console.ReadKey(); 

热点排行