日期:2014-05-17  浏览次数:20869 次

一个正则表达式的问题 谢谢
本帖最后由 cnxxxxcncn 于 2013-08-06 10:23:21 编辑
 

string  c2="javastr=javastr+'<span style=\&quot;font-size:9pt;line-height:15pt\'><img src='images/news.gif' border=0 alt='图片新闻'><a href=\'shownews.asp?id=0\' title=\'admin888|3acdbb255b45d296\' target=\'_blank\'>guali|3acdbb255b45d226</a></span> '
javastr=javastr+'<td style=\'BORDER-bottom: #999999 1px dotted\'><font color=\'#999999\' >[1900-1-6]</font> <font color=\'#999999\' >(点击<font color=\'#FF0000\' >8</font>)'
javastr=javastr+'</td></tr>'

javastr=javastr+'<tr> <td width='6%'>&nbsp;<img src='Img/arrow_6.gif' width='11' height='11'></td><td width='65%' height=\'24\' style=\'BORDER-bottom: #999999 1px dotted\'>'
javastr=javastr+'<span style=\&quot;font-size:9pt;line-height:15pt\'><img src='images/news.gif' border=0 alt='图片新闻'><a href=\'shownews.asp?id=0\' title=\'lizhou|778ec9dc0d2a59d4\' target=\'_blank\'>管理|779ec9dc0d2a59d4</a></span> '
javastr=javastr+'<td style=\'BORDER-bottom: #999999 1px dotted\'><font color=\'#999999\' >[1900-1-6]</font> <font color=\'#999999\' >(点击<font color=\'#FF0000\' >8</font>)'
javastr=javastr+'</td></tr>'

javastr=javastr+'<tr> <td width='6%'>&nbsp;<img src='Img/arrow_6.gif' width='11' height='11'></td><td width='65%' height=\'24\' style=\'BORDER-bottom: #999999 1px dotted\'>'
javastr=javastr+'<span style=\&quot;font-size:9pt;line-height:15pt\'><a href=\'shownews.asp?id=77\' title=\'低压网络无功补偿经验漫谈(转)\' target=\'_blank\'>低压网络无功补偿经验漫谈(转)</a></span> '
javastr=javastr+'<td style=\'BORDER-bottom: #999999 1px dotted\'><font color=\'#999999\' >[2009-4-15]</font> <font color=\'#999999\' >(点击<font color=\'#FF0000\' >372</font>)'
javastr=javastr+'</td></tr>'";






string f = @"正则表达式";
            foreach (Match m in Regex.Matches(c2, f))
            {
                

                listView3.Items.Add(cunt2.ToString());