All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

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

Writer: delv Article type: Programming skills(编程技巧) Time: 2014/1/10 6:28:09 Browse times: 367 Comment times: 0

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


Head photo

Go homepage
Upload pictures
Write articles

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

///


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

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

来源:网络





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.