达人怎么过滤数字以外的字符啊
string abc="88amdw$%wk87"
我只要取得88 87的数字其它字符不要
这怎么做啊谢谢了
------解决方案--------------------
using System.Globalization;
private void button1_Click(object sender, EventArgs e)
{
string abc = "88amdw$%wk87";
string da = "";
foreach (char var in abc )
{
if (CharUnicodeInfo.GetUnicodeCategory(var ) == UnicodeCategory.DecimalDigitNumber )
{
da += var;
}
}
MessageBox.Show(da);
}