求正则表达式<url>192.168.0.1/ppush/index.jsp</url><msg charset="gb2312">好,好好20好好</msg> <url>192.168.0.1/ppush/index.jsp</url><msg charset="gb2312">好,好好20好好</msg>===>192.168.0.1/ppush/index.jsp好,好好20好好 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你要的正则表达式:(?<=<.+?>)[^<]+?(?=</.+?>)string s=@"<url>192.168.0.1/ppush/index.jsp</url><msg charset=""gb2312"">好,好好20好好</msg>"; string myRegex=@"(?<=<.+?>)[^<]+?(?=</.+?>)"; System.Text.RegularExpressions.MatchCollection mc; mc=System.Text.RegularExpressions.Regex.Matches(s,myRegex,System.Text.RegularExpressions.RegexOptions.Multiline); string resultString=string.Empty; foreach (System.Text.RegularExpressions.Match m in mc) { resultString +=m.Value; } MessageBox.Show( resultString); 捕捉电脑桌面并且保存为图片(大哥大姐帮帮忙) 如何调出任务管理器 asp.net C# 获取动态控件值的问题 难呀!如何获取126、163邮箱的通讯录? C#winform中怎么样跟居肉容查找listView相批的一行为选定状态. C#概念问题 请解释一下这两行代码的意思 DataGridView 中不能显示图片的问题 简单问题,望有人指点! 用EF好还是自己写数据访问层比较好。 学生成绩分析系统 在C#的datagrid中将某个cell的值清空后,保存,在设置数值,为什么报错呀?
string myRegex=@"(?<=<.+?>)[^<]+?(?=</.+?>)";
System.Text.RegularExpressions.MatchCollection mc;
mc=System.Text.RegularExpressions.Regex.Matches(s,myRegex,System.Text.RegularExpressions.RegexOptions.Multiline);
string resultString=string.Empty;
foreach (System.Text.RegularExpressions.Match m in mc) {
resultString +=m.Value;
}
MessageBox.Show( resultString);