Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)delv
published in(发表于) 2014/1/10 6:28:09
ASP.NET技巧:正则表达式提取数字_[Asp.Net教程]

ASP.NET技巧:正则表达式提取数字_[Asp.Net教程]

///


/// 获取字符串中的数字
///

///
///
private int GetNumber(string par)
{
string strTempContent =par;
strTempContent = System.Text.RegularExpressions.Regex.Replace(strTempContent, @"[^\d]*", "");
return Convert.ToInt32(strTempContent);
}


来源:网络







If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759