日期:2014-05-18 浏览次数:20369 次
protected void Page_Load(object sender, EventArgs e) { string aa = "a12,13b"; Regex re = new Regex(@"/[^\d]+/g"); Match m = re.Match(aa); Console.WriteLine(m.Groups[1].Value); }
protected void Page_Load(object sender, EventArgs e) { string aa = "a12,13b"; Regex re = new Regex(@"\D+"); string result = re.Replace(aa, ""); Response.Write(result); }