有一种方法可以反转RegEx.MatchCollection的项目吗?
例如,如果MatchCollection包含那些匹配项:
a1
a2
a3
然后,我想撤消集合项,因此项索引将是这样:
a3
a2
a1
...保留其比赛索引和其他比赛信息,例如长度,分组等。
不完全MatchCollection
是IEnumerable<Match>
myMatchCollection.Cast<Match>().Reverse()
可能足够好。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句