发新话题
打印

asp.net提取字符串中的数字

asp.net提取字符串中的数字

用正则表达式:
string a = "1fd8ew1aaew3";
TextBox1.Text = System.Text.RegularExpressions.Regex.Replace(a, @"[^\d]*", "");

TOP

发新话题