Turning RexEx Capture groups into a list of strings

I am trying to add all of the capture groups results from a “Matches” activity to a list. E.g.

Group 1: n/a
Group 2: n/a
Group 3: “Matt”
Group 4: n/a

should come out as a list that looks like this… {“”,“”,“Matt,”"}

This is the code I tried “DealMatches(0).Groups.ToList” and I got a “.ToList is not a member” error.

A for each works, but I am trying to avoid it as it slows things down a lot since the actual amount of capture groups is very large, and speed is very important here.

give a try on
DealMatches(0).Groups.Cast(Of Group).Skip(1).toList

For some more details on using cast have a look here

grafik

1 Like