using System.Text.RegularExpressions;
//如果是只有一个数字串,这样
// string yourStr = this.TextBox1.Text;
// string resultStr = System.Text.RegularExpressions.Regex.Replace(yourStr, @"/D+", "");
// Response.Write(resultStr);
//如果有多个数字串,这样
string yourStr = this.TextBox1.Text;
string resultStr=string.Empty;
MatchCollection mc = System.Text.RegularExpressions.Regex.Matches(yourStr, @"/d+");
foreach (Match m in mc)
{
resultStr += m.Value + "/n";
}
Response.Write(resultStr);