匹配中文字符的正则表达式: [\u4e00-\u9fa5]

Regex r = new Regex("[\u4e00-\u9fa5]",RegexOptions.Multiline);

            MatchCollection matchs = r.Matches(this.ClassID.SelectedItem.Text);
            string aa="";
            foreach (Match m in matchs)
            {
                aa += m.ToString();
            }
           
            this.ClassNameEdit.Text = aa;

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2021-06-11
  • 2022-01-01
猜你喜欢
  • 2022-02-19
  • 2021-10-15
  • 2022-12-23
  • 2021-10-27
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案