How to Array to contain array

hi bro
If you have data in the form of array and there are duplicate characters in the data, you want to exclude it from the array. Please tell me the answer.

1 bro
2 bro1
3 bro2
4 bro3
5 dad
6 dad2
7 dad3
8 dad7


1 bro
5 dad


Are you able to use arrayVariable.distinct and assign it to a different variable?

Is it possible
However, the number of arrays is not fixed.

Some of the answers in this thread may be more helpful :

May I know what do mean like duplicate here in the elements of array buddy
Even 2 bro1 has no duplicate in it

Kindly correct me if I m wrong
And to Arrayvariable.Distinct() method will give us the distinct elements in the array and that has no impact on number of elements in it

Cheers @Lova_Kyle

1 Like

Assuming, the difference of each value is the numerical values, then you could use .Select() to remove the numbers, then .Distinct to take unique values… there might be other ways too.

For example,
arr.Select(Function(x) Regex.Replace(x, "[0-9]", "") ).Distinct

1 Like

I think you hit the nail on the head Clayton!

I totally misinterpreted the intent behind the question.

Fantastic solution by the way!

1 Like

Thank you so much

1 Like

Thank you so much~

thank you~