Is there any way to remove duplicates in a list through Regular expression If we have duplicates in it. without using set operation
["name1", "name2", "name3", "name4", "name1", "name2", "name3", "name4"]
I want output as
["name1", "name2", "name3", "name4"]