很有意思的一段代码,代码实现对HTML内容中所有图片信息的提取,大家有时间的可以研究一下,完善一下程序。 protected ArrayList GetAList(string HtmlContent)
{
try
{
ArrayList arr = new ArrayList();
HtmlContent = content.Replace(\"\\r\\n\",\"\");
HtmlContent = content.Trim();
string partern = @\"\\\";//@\".* \";//\"<a.*(?=Headline)(.|\\n)*?</a>\";//@\"/.*/ \";
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(partern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
System.Text.RegularExpressions.MatchCollection mc = regex.Matches(HtmlContent);
if(mc.Count <= 0)