string str1=""; string str2="a12sd3asd4"; str1= Regex.Replace(str2,@"\D+", "");
str1的值为"1234"
后台正则从字符串中提取数字,布布扣,bubuko.com
后台正则从字符串中提取数字
原文:http://blog.csdn.net/gongth_12/article/details/21172699