Using LINQ extension method syntax on a MatchCollection

前端 未结 6 1248
逝去的感伤
逝去的感伤 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 01:46

    You can try something like this:

    List matchList = matches.Cast().Where(m => m.Groups["name"].Value.Length > 128).ToList();
    

提交回复
热议问题