C# 正则表达式匹配中文字符
Regex regex = new Regex(@"[\u4e00-\u9fa5]"); // 定义正则表达式,匹配Unicode编码范围内的中文字符 string input = "fefe 年年年 商 eeeeee"; // string matches = regex.Replace(input,""); // 进行匹配操作 MatchCollection matches = regex.Matches(input); foreach (Match match in matches) { Console.WriteLine("找到了中文字符:" + match.Value); }