Insert Match Results to Specific Column of DataTable

I have 2 Regex match activities which extract information. Each Regex match have multiple match results. I want to insert each of the regex match results in a single data table.
My data table will have 2 column to store both regex match results.
Example datatable:
image

The problem that I’m facing is that, the results from 2nd regex will not insert into the 2nd column, but it enters in the 1st column. How can I insert the regex match results into a specific column ?
image
image

Hi,

Probably, you should write it as the following.

note: i is int32 var which is set index property of ForEach

Regards,

1 Like

Hi NAJAA BAZILAH,

If you want them to go into the same Row i would advice you nest the for each activities and then assign each regex match into variables then adding them using the Add Data Row. Use the Array Row propert and set it to {variable1,variable2}.

I hope this helps!

Will this method work if the number of rows is not similar for both regex match ?

Hi,

No, it’s assumed number of their count is same.
If you need to write them as pair , perhaps you should review your regex. For example, using single regex pattern which has groups.

Regards,

1 Like

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