Good question.
There is a Regular Expression ...
http://www.regular-expressions.info/regexb...plicatecsv.html
... which should match duplicate comma-delimited items.
(?<=,|^)([^,]*)(,\1)+(?=,|$)
Having this list of items ...
"Female Vocalists, Indie, Indie Rock, Alternative, Rock, Indie Pop, Pop/Rock, Alternative Rock, Punk, Indie Rock, Alternative/Indie Rock, Alternative Pop/Rock, Garage Rock Revival, Bright, Fun, Stylish, Uplifting, Nostalgic, Exciting, Girls Night Out, Breakup"
... the Regular Expression matches nothing.
We have to sort the list of items ...
Alternative Pop/Rock,Alternative Rock,Alternative,Alternative/Indie Rock,Breakup,Bright,Exciting,Female Vocalists,Fun,Garage Rock Revival,Girls Night Out,Indie Pop,Indie Rock,Indie Rock,Indie,Nostalgic,Pop/Rock,Punk,Rock,Stylish,Uplifting
... now the Regular Expression can find the red colored duplicates.
But it looks a bit as if there is a quirk in the Regular Expression, because of the also matched comma delimiter between the duplicate items.
The first matching group is: "Indie Rock".
The second matching group is: ",Indie Rock".
Well, when removing one of the matching items, the itemlist will be keep intact as a comma delimited list of items.
Mp3tag has no sort function yet (request has been opened a few days ago).
... to be continued ...
DD.20100920.2332.CEST