Go homepage(回首页) Upload pictures (上传图片) Write articles (发文字帖)
The author:(作者)delvpublished in(发表于) 2014/1/10 6:28:09 ASP.NET技巧:正则表达式提取数字_[Asp.Net教程]
/// /// 获取字符串中的数字 /// /// /// private int GetNumber(string par) { string strTempContent =par; strTempContent = System.Text.RegularExpressions.Regex.Replace(strTempContent, @"[^\d]*", ""); return Convert.ToInt32(strTempContent); }
来源:网络
赞