<FONT color=#1859ab>作者:</FONT>天雨寒 | <FONT color=#1859ab>类别:</FONT>浪子异侠 | 2006-4-6 更新我想用正则表达式取出里面的汉字!请问如果写正则表达式

解决方案 »

  1.   

    try {
    Regex RegexObj = new Regex("[\\u4e00-\\u9fa5]+");
    Match MatchResults = RegexObj.Match(SubjectString);
    while (MatchResults.Success) {

    MatchResults = MatchResults.NextMatch();

    } catch (ArgumentException ex) {
    // Syntax error in the regular expression
    }
      

  2.   

    自己解决了给大家共享一下作者:\s*<\s*/FONT+?>(?<atext>([^\|])*)\|.*类别:\s*<\s*/FONT+?>(?<atext1>([^\|])*)\|
      

  3.   

    [\u4E00-\u9FA5]*$   此为汉字正则表达式,可用于另何语言,js ,C#皆可