Iterate through Match Collection

As I have a regex match collection and I need to get certain range of values from it.
like first 5 values for var 1 and last 5 for var 2.
Without loop , how we can achieve this via script??

@agathiyanv
Kindy shares the sample input and expected output. It helps us to provide you with a better solution for you.

I have match Collection which contains 20 matches .
Now i need to create three variables and store the matches like this:
Var1 : Concatenates first 5 matches from the collection and assign it
var2:Concatenates second 5 matches from the collection and assign it
var3:Concatenates third 5 matches from the collection and assign it
Instead using for loop , how we do this ?

Hi @agathiyanv

Check on this

String.Join(",",regexvar.Take(5))

Regards
Sudharsan