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

CrazyCodeYjp 2012-05-27 03:19:04
C# 中 怎么把 \\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b 转换为 \x00\x00\x00\x00\xaa\x8f\x 求救 在线等
...全文
294 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
dalmeeme 2012-05-27
  • 打赏
  • 举报
回复
			string s = @"\\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b";
string r = s.Replace(@"\\x", @"\x");
Console.Write(r);
Console.ReadKey();
mathieuxiao 2012-05-27
  • 打赏
  • 举报
回复
input.Replace("\\\\", "\\");
ParanoidKing 2012-05-27
  • 打赏
  • 举报
回复
[code=C#]
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");
[/Code]

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧