正则 提取html标签value
using System.Text.RegularExpressions;
//step2: extract expected info//<h1 class="h1user">crifan</h1>string h1userP = @"<h1\s+class=""h1user"">(?<h1user>.+?)</h1>";Match foundH1user = (newRegex(h1userP)).Match(rtbExtractedHtml.Text);if (foundH1user.Success){ //extracted the expected h1user's value txbExtractedInfo.Text = foundH1user.Groups["h1user"].Value;}else{ txbExtractedInfo.Text = "Not found h1 user !";}

浙公网安备 33010602011771号