I am targeting invoice details with Regex. I have build a loop where matches go to their own Lists(of objects). When i write line items i get System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match]
How do i get values out of the match lists?
Thanks!
@Mikko_S Can you send the xaml file with the input? It looks to me Like you’re Adding the Output of Matches Activity to a Collection, which is arrMatchOrder, Am I right ?
@Mikko_S Keep the Type of item in Second For Each as System.Collections.Generic.IEnumerable<System.Text.RegularExpressions.Match>
Then use another For Each Inside it where pass the input as item of first for and type argument keep it as Match
Then use a write Line for that variable
The matches activity results in IEnumerable. i.e., the result will have more than one occurrence.
Hence you need to loop through each occurrence and then use add to collection activity inside the loop.
P.S: The object type in for each activity should be match and while writing it into collection, convert it to string.
@Madhavi listOf variable is of the Type List<IEnumerable(Match)>
Hence this is the flow, For each item in listOf, now Item is of type IEnumerable(Match) For Each item1 in item, now item1 is of type Match
item1.Value
@Madhavi Oh, I found out the way using Two loops, if you have a Better way , Please Share the way How to use, People get benefitted if it is efficient ,