日期:2014-05-18  浏览次数:20885 次

怎样删除一个字符串中除了汉字之外的所有字符,包括删除标点、字母、数字、特殊符号等!
用C#怎样实现?

------解决方案--------------------
try...

C# code
Regex reg = new Regex(@"[^\u4e00-\u9fa5]+");
string result = reg.Replace(yourStr, "");
richTextBox2.Text = result;