How to remove duplicated names within a tag

Some of my songs have the ARTIST field like:

Artist1, Artist1, Artist2, Artist3

Arist1, Artist2, Artist1, Artist3

It is, duplicated artist names inside the tag Artist. What I'd like to do is create an action that can find igual strings between the comas, and remove them, allowing only one.

If it's impossible, it could be something like testing only the two first strings.

%dummy1%, %dummy2, %dummy_the_rest%,

And if %dummy1% = %dummy2%, then %dummy2% is replaced by an empty space (so it would be removed).

See this thread: