替换字符串
1using System.Text.RegularExpressions;
2
3 /// <summary>
4 /// 字符串处理(将"%0d%0a"还原成"\r\n")
5 /// </summary>
6 /// <param name="stringIn">输入字符串</param>
7 /// <param name="stringOut">输出字符串</param>
8 /// <returns></returns>
9 protected string stringManage(string stringIn)
10 {
11 string stringOut = Regex.Replace(stringIn, @"%0d%0a", "\r\n").ToString();
12 return stringOut;
13 }
2
3 /// <summary>
4 /// 字符串处理(将"%0d%0a"还原成"\r\n")
5 /// </summary>
6 /// <param name="stringIn">输入字符串</param>
7 /// <param name="stringOut">输出字符串</param>
8 /// <returns></returns>
9 protected string stringManage(string stringIn)
10 {
11 string stringOut = Regex.Replace(stringIn, @"%0d%0a", "\r\n").ToString();
12 return stringOut;
13 }
HelloWorld