111,126
社区成员
发帖
与我相关
我的任务
分享
string s = "sdf$%^$%546";
string sNew = Regex.Replace(s,"\\W","");
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
namespace CSDN
{
class Application
{
static void Main(string[] args)
{
string s = "sdf$%^$%546";
string sNew = Regex.Replace(s,"[^a-zA-Z0-9]","");
}
}
}