c#正则匹配 <A class="W_f14 S_func1" href="http://weibo.com/u/1950836865" target=_blank usercard="id=1950836865">公益魏豪</A> <SPAN class=addr><EM class="W_ico12 male"></EM>辽宁 大连 </SPAN>如何获取 usercard="id=1950836865中1950866865的值和”公益富豪“的值呢求高手解答谢啦 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string pattern=@"(?i)<a[^>]*?href=[""']http://weibo\.com/u/(\d+)[""'][^>]*>([^<]*)</a>"; Match match = Regex.Match("a", "<A[\w\W]+?id=(\d+)">([\w\W]+?)</A>");string str1=match.group[1].value;string str2=match.group[2].value; string input= <A class="W_f14 S_func1" href="http://weibo.com/u/1950836865" target=_blank usercard="id=1950836865">公益魏豪</A> <SPAN class=addr><EM class="W_ico12 male"></EM>辽宁 大连 </SPAN>;Match =Regex.Match(input,"<A class=.+usercard=\"([0-9]+)\">(\w+)</A>")value1 = Match.Groups[1].valuevalue2 = Match.Groups[2].value Match match = Regex.Match(string yourstr, "<A[\w\W]+?id=(\d+)">([\w\W]+?)</A>"); <A (class=\".+[^\"]\" )?href="http://weibo.com/u/(\d+)" target=_blank usercard=\"(.+[^\"])\" .+[^>]>(\w+[^<])</A> Group[1]是1950866865Group[2]是公益富豪 c# sql2000在线考试系统 探讨个问题~~~~~~~~ C#中struct与class 企业库里插件式的工程是怎么开发的呢? 谁能给个思路或例子 WPF 3DTools控件使用 vs2005能否在编译后配置客户端的web services的url 如何用C#邮件发送图片和html格式文件(在正文中非是附件) 求教我在窗口的On_Paint事件里添加了如下代码,当窗口每次重绘,我发现程序所占内存就增加,该如何解决? 请问如何在程序中禁用打印机 各位兄台:有没有现成的“计算器”原码? c# oralce 数组参数批量更新出现 deadlock 错误 引用WSDL文件生成类型的问题
string str1=match.group[1].value;
string str2=match.group[2].value;
Match =Regex.Match(input,"<A class=.+usercard=\"([0-9]+)\">(\w+)</A>")
value1 = Match.Groups[1].value
value2 = Match.Groups[2].value
Group[2]是公益富豪