Matchcollection

@Kian

OK, I was still at your initial question.

I think you should rename this topic to MatchCollection to Array and validate my first answer and create another topic like “combining two arrays” because it might help others.

Anyway, for “combining” two array, use Zip method. In the “Function” part you can produce a lot a convenient combination. Be careful as result’s element count will be the same as the shortest array (see example at the end).

With arr1 and arr2 as two Array of String

Assign (IEnumerable Of Array Of String)
combined = arr1.Zip(arr2, Function(a, b) {a, b})

This is enough for iterating over the result with a ForEach. If you want an array:

Assign (Array Of Array Of String)
newArray = arr1.Zip(arr2, Function(a, b) {a, b}).ToArray

For this last one, if you have

letters = {"one", "two", "three", "four"}
digits = {"1", "2", "3"}
newArray = letters.Zip(digits, Function(letter, digit) {letter, digit}).ToArray

newArray will be {{"one", "1"}, {"two", "2"}, {"three", "3"}}