从字符串中抽取所有汉字

来源:互联网 发布:穿针引线软件下载 编辑:程序博客网 时间:2024/04/30 15:55
public string test(string content)
{
   Regex regex=new Regex("[/u4e00-/u9fa5]+");
   string str="";
   foreach(Match m in Regex.Matches(content))
   {
     str+=m.Value;
   }
   return str;
}
原创粉丝点击