Using LINQ extension method syntax on a MatchCollection

前端 未结 6 1259
逝去的感伤
逝去的感伤 2020-12-13 01:20

I have the following code:

MatchCollection matches = myRegEx.Matches(content);

bool result = (from Match m in matches
               where m.Groups["nam         


        
6条回答
  •  孤城傲影
    2020-12-13 02:08

    I think it would be something like this:

    bool result = matches.Cast().Any(m => m.Groups["name"].Value.Length > 128);
    

提交回复
热议问题