这个正则表达式怎么写啊? \<\bimg\b\>\s*(?<name>\d*)\s*\<\/\bimg\b\>name 就是取出的数~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 tryusing System;using System.Text.RegularExpressions; string str = "<img>10</img>.....<img>22</img>....."; Regex myre = new Regex(@"<img>([^<]+)</img>", RegexOptions.IgnoreCase); MatchCollection mclist = myre.Matches(str); foreach (Match m in mclist) Console.WriteLine(m.Groups[1]); to saucer(思归, MS .NET MVP) :thanks, you help me too DataTable 添加DataRow[] 的方法? 登陆很简单的问题 listBox绑定多列 C#处理Excel问题(插入行),急,在线等! tabcontrol有两个tab,但是只有第一个能看到状态栏,第二个就没有了,怎样调出来? 两个函数中的数据库操作,怎样让它在一个事务中进行? 工作一段时间了! 求那位大哥帮帮忙 一道关于算法的面试题 求助:我的.net程序在某机器上报错"String was not recognized as a valid DateTime" 如何在vs.net中实现web应用程序的多人协作开发 怎样调用一个应用程序,高手进!!
using System.Text.RegularExpressions; string str = "<img>10</img>.....<img>22</img>.....";
Regex myre = new Regex(@"<img>([^<]+)</img>", RegexOptions.IgnoreCase);
MatchCollection mclist = myre.Matches(str);
foreach (Match m in mclist)
Console.WriteLine(m.Groups[1]);
thanks, you help me too