日期:2014-05-17 浏览次数:21503 次
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");
------解决方案--------------------
string s = @"\\x00\\x00\\x00\\x00\\xaa\\x8f\\x63\\x3b"; string r = s.Replace(@"\\x", @"\x"); Console.Write(r); Console.ReadKey();