小技巧积累

C# 读取txt 文件 乱码 解决方法

1.

using (StreamReader sr1 = new StreamReader(FILE_INFO_NAME,UnicodeEncoding.GetEncoding("GB2312")))

2.

StreamReader reader=new StreamReader(fileName,System.Text.Encoding.Default)

将输入字符串的http://www.sina.com.cn 的样式换成 URL

将输入字符串的 http://www.sina.com.cn的样式换成 URL:
Regex.Replace(strContent, @"(http:\/\/([\w.]+\/?)\S*)", "<a href=\"${1}\" _fcksavedurl="\"${1}\"" target=\"_blank\">${1}</a>");

你可能感兴趣的:(C++,c,C#)