string oldStr = @\”测试换行回车符\\r\\n替换成\\\\n\”;
MatchEvaluator matchEvalu = delegate (Match m)
{
return \”\\\\n\”;
};
string newStr = Regex.Replace(oldStr , @\”\\r\\n\”, matchEvalu);
string oldStr = @\”测试换行回车符\\r\\n替换成\\\\n\”;
MatchEvaluator matchEvalu = delegate (Match m)
{
return \”\\\\n\”;
};
string newStr = Regex.Replace(oldStr , @\”\\r\\n\”, matchEvalu);