字符处理 string s = "ffdsaf2121fdsafd";字符串不确定,想用正则表达式快速行到2121中间这段数字有什么方法 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string s=""; foreach(Match m in Regex.Matches(s,@"\d+")) { Console.WriteLine(m.Value); } using System.Text.RegularExpressions; ......... string str1 = "ffdsaf2121fdsafd";string str2 = @"\d+"; //正则表达式,匹配数字串的 MatchCollection Matches = Regex.Matches(str1, str2); foreach (Match NextMatch in Matches) { string num = NextMatch.Value; } ASP.NET中调用外部DLL时,它自带的INI文件读取不了 DBEntry 用orm的方式保存数据出错 为何上传文件忽然不行了? 访问权限问题 如何打印Datagrid表 100分 如何调用网络打印机打印本地c:\test.txt 文件(网上等) login控件如何绑定已有的数据库呢,谢谢 关于List<>泛型绑定的问题? 怪事 如何取出DataGrid中HyperLinkColumn列的值 sql修改语句写法 页面嵌代码不用if else 好恶心
foreach(Match m in Regex.Matches(s,@"\d+"))
{
Console.WriteLine(m.Value);
}
string str2 = @"\d+"; //正则表达式,匹配数字串的 MatchCollection Matches = Regex.Matches(str1, str2); foreach (Match NextMatch in Matches)
{
string num = NextMatch.Value;
}