//convert \xXX into corresponding char //eg: \x0A -> '\n' public string filterEscapeSequence(string esacapeSequenceStr) { string filteredStr = Regex.Replace(esacapeSequenceStr, @"\\x\w{2}", new MatchEvaluator(_replaceEscapeSequenceToChar)); return filteredStr; }