For each collections Matches

i need to get each parameter i took from matches, there is more than one result, and i want to add that results in a data table.

So which type should i use in for each?? and how to write the item

Captura de pantalla de 2021-01-22 10-15-37

@Amanda_Calderon

welcome to the forum

for iterating the matches within a for each activity the typeArgument is System.Text.RegularExpressions.Match

Within the loop the retrival will done on the current looped Match Object e.g.

  • yourMatchVar.Value.ToString - taking entire Capture
  • yourMatchVar.Groups(1).toString - taking first Group Capture

Have a look here to get an introduction to Regex with UiPath:

2 Likes

for taking the first group capture you need to use 1 instead of 0
indexing for regex groups start at 1 :slight_smile:

1 Like

just to visualize it:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.