<meta name="description" content="活動『閃耀祭(狂歡節)』官網 【雪酷在線8月16日報道】于2009年11月21日公映的劇場版動畫『劇場版 超時空要塞F 虛空歌姫』的后篇作品『超時空要塞F 戀離飛翼』決定將于2011年" /> 我只需要得到 content的內容就可以了..請問如何操作...謝謝....NET技術正則表達式問題補充: 感謝Astar的幫助... 我手上有個正則的代碼..能用特定標簽將所需要的數據讀出來 請問一下該正則的語法是什么? 我貼一下代碼: public string[] GetImageUrl(string sHtmlText) { // 定義正則表達式用來匹配 img 標簽 Regex regImg = new Regex(@"<img\b[^<>]*?\bsrc[\s\t\r\n]*=[\s\t\r\n]*[""']?[\s\t\r\n]*(?<imgUrl>[^\s\t\r\n""'<>]*)[^<>]*?/?[\s\t\r\n]*>", RegexOptions.IgnoreCase); // 搜索匹配的字符串 MatchCollection matches = regImg.Matches(sHtmlText); string[] sUrlList = new string[matches.Count]; int i = 0; // 取得匹配項列表 foreach (Match match in matches) sUrlList[i++] = match.Groups["imgUrl"].Value; return sUrlList; }
- 2 回答
- 0 關注
- 1421 瀏覽
添加回答
舉報
0/150
提交
取消