取字符串中的数字

例如:string str="AAA123BB";
现在要取出123

string str = "AAA123BB";
string result = string.Empty;
Match m 
= Regex.Match(str, @"\d+");
if (m.Success)
{
    result 
= m.Value;
}


posted @ 2007-08-06 13:57  Nicky(花仔)  阅读(478)  评论(0编辑  收藏  举报