asp.net采集
采集
取得頁面HTML代碼的例子上面已經給出不少了 ?
? 下面的代碼是使用正則表達式取得HTML中內容的代碼 ?
? Regex ? regex1 ? = ? new ? Regex(this.NameKey, ? RegexOptions.Singleline ? | ? RegexOptions.IgnoreCase ? ); ?
? MatchCollection ? collection1 ? = ? regex1.Matches(this.ArtHtml); ?
? if ? (collection1.Count>0) ?
? { ?
? result=collection1[0].Result("${title}");
取得頁面HTML代碼的例子上面已經給出不少了 ?
? 下面的代碼是使用正則表達式取得HTML中內容的代碼 ?
? Regex ? regex1 ? = ? new ? Regex(this.NameKey, ? RegexOptions.Singleline ? | ? RegexOptions.IgnoreCase ? ); ?
? MatchCollection ? collection1 ? = ? regex1.Matches(this.ArtHtml); ?
? if ? (collection1.Count>0) ?
? { ?
? result=collection1[0].Result("${title}");
總結
- 上一篇: DevExpress Asp.net(6
- 下一篇: 用人不疑,疑人不用