<div action-type=\"feed_list_item\" mid=\"3587372387770935\" class=\"WB_feed_type SW_fun \"> \n <div class=\"WB_screen\" style=\"display:none;\"><a class=\"W_ico12 icon_choose\" href=\"\"><\/a><\/div>\n <div class=\"WB_feed_datail S_line2 clearfix\">\n <div class=\"WB_detail\">\n \n <div class=\"WB_text\" node-type=\"feed_list_content\" nick-name=\"追风的虎\">非常漂亮的Ribbon界面<\/div>\n <!-- 引用文件时,必须对midia_info赋值 -->\n\n<!-- 微博心情,独立于标准的ul节点 -->\n <ul class=\"WB_media_list clearfix\" node-type=\"feed_list_media_prev\">\n <li>\n <!-- img之间不能加空格 -->\n <div class=\"chePicMin S_bg2 bigcursor\" action-type=\"feed_list_media_img\" action-data=\"uid=1299831822&mid=3587372387770935\" suda-data=\"key=feed_image_click&value=image_zoomin\"><img class=\"bigcursor\" node-type=\"feed_list_media_bgimg\" src=\"http:\/\/ww2.sinaimg.cn\/thumbnail\/4d79dc0egw1e5i53mxshsj20fj0cijtp.jpg\" alt=\"\"\/><img style=\"left: 39.5px; top: 52px; display: none;\" src=\"http:\/\/img.t.sinajs.cn\/t5\/style\/images\/common\/loading.gif\" class=\"loading_gif\"><\/div>\n <\/li>\n <\/ul>\n <div class=\"WB_media_expand SW_fun2 S_line1 S_bg1\" style=\"display: none;\" node-type=\"feed_list_media_disp\"><\/div>\n <div class=\"feed_tag_list_form clearfix\" node-type =\"feed_list_tagList\">\n
string pattern=@"<div[^<]*(mid=\w+)[^<]*>";
MatchCollection mch=Regex.Matchs(text,pattern);
foreach(Match m in mch){
mid=Regex.Replace(m.Value,pattern,"$1");
}