Reveal a list with full name

Hi friends!

I have a list of full names, some of them may be repeated, but only the copy contains the last name and first name, and there is no middle name. I need to delete such copies, and leave the list with only the full name. For example,
what is at the moment:
image
what I would like to implement:
image

I will be grateful for any help

Hi,

Can you try the following expression?

dt = dt.AsEnumerable.Where(Function(r) not dt.AsEnumerable.Any(Function(r2) System.Text.RegularExpressions.Regex.IsMatch(r2("FULL NAME").ToString,"^"+r("FULL NAME").ToString+".+"))).CopyToDataTable

Regards,

1 Like

thank you so much

1 Like

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