日期:2014-05-17 浏览次数:20514 次
StreamReader reader = new StreamReader("c:\\temp\\1.txt",Encoding.Default);
string source = reader.ReadToEnd();
Regex reg = new Regex(@"(?is)(?<=>)[^<]+(?=<)");
MatchCollection mc = reg.Matches(source);
foreach (Match m in mc)
{
MessageBox.Show(m.Value);
}
public static string ReplaceHtmlMark(string HtmlString)
{
string[] RegexString = {
@"style='.*?'",
@"class='.*?'",
@"<param.*?>(</param>)?",
@"<embed.*?>(</embed>)?",
@"<object.*?>(</object>)?",
@"<strong.*?>(</strong>)?",
@"<span.*?>(</span>)?",