|
Regex reg = new Regex(@"(?is)<a\s+(?:(?<key>[^\s=]+)=(?<value>[^\s>]+)\s*)+>(?<text>(?:(?!</?a\b).)*)</a>"); MatchCollection mc = reg.Matches(html); List<CategoryInfo> ctg = null; if (mc.Count > 0) { ctg = new List<CategoryInfo>(); foreach (Match m in mc) { string v = m.Groups["value"].Value; string t = m.Groups["text"].Value; } } |
|