110,536
社区成员
发帖
与我相关
我的任务
分享
@"<TABLE[^>]*?>(?:\s*<[^>]*?>\s*)*(?:<!--(?:(?!-->)[^^])*?-->)*<font[^>]*?>(?'product'[^<>]*?)</font></TD>(?#...
...)(?:\s*<[^>]*?>\s*)*【[^】]*?】(?'number'[^<>]*?)</TD>(?:\s*<[^>]*?>\s*)*【[^】]*?】(?#.....)<a[^>]*?><font[^>]*?>(?'name'[^<>]*?)</font>(?:\s*<[^>]*?>\s*)*"
string tempStr = File.ReadAllText(@"C:\Documents and Settings\Administrator\桌面\Test.txt", Encoding.GetEncoding("GB2312"));
string pattern = @"(?<=】((-->)(<[^>]+>)+|(?!-->)(<[^>]+>)*))(?<text>[^<]+)";
foreach (Match m in Regex.Matches(tempStr, pattern))
{
//循环输出
string matchtext = m.Groups["text"].Value;
}