c # specific tag content taken html tags removed

Match match = Regex.Match(x, "(?<=(<p[.\\s\\S]*?>))[.\\s\\S]*?(?=(</p>))", RegexOptions.Multiline | RegexOptions.Singleline);
            MatchCollection m=Regex.Matches(x, "(?<=<p[.\\s\\S]*?>)[.\\s\\S]*?(?=</p>)", RegexOptions.Multiline | RegexOptions.Singleline);
            while (match.Success)
            {
                Console.WriteLine(match.Value);
                match = match.NextMatch();
            }

P Remove the label content, is the next time, but also with <p>, it seems a little strange

tem_description = Regex.Replace(tem_description, "<[^>]+>", "");
                        tem_description = Regex.Replace(tem_description, "&[^;]+;", "");

Remove html tags

Guess you like

Origin www.cnblogs.com/huanyun/p/11008602.html