i am trying to take a few information from a website (an identifier which is a 5 digit number).
But the page has duplicate entries. how can i get only the unique values from the page.
or is there a function like ‘distinct’ which i can use to get the unique numbers out of this? i tried a few methods but am not able to come up with a solution. below is an example data
I found a solution within regex.
If anybody else is looking for something similar similar - this is how i did it
(yourRegEx)(?<!\1[\s\S]\1) - this will provide unique occurrences from the entire content
(yourRegEx)(?<!\1.\1) and this from the same line
let me know if you have any doubts.
I would still like to see how you can get unique records from uipath. the main problem was converting the variable system.text.regularexpressions.match
An easier way is to use the matches activity (or Regex.Matches in an assign activity) which returns ienumerable<matches> dataType. Then you can add each value to a list using a For each activity. Within the for each use the ‘add to collection’ activity to add each match.value to a list of strings. Then use an assign activity (after the for each activity) to assign YourList = YourList.Distinct.ToList