Hello
I use this wonderfull program to organize my music collection for years now.
However i finaly encounterd a problem that my google fu cant solve:
Situation: The shitty stereo in my new used car can only play mp3s and cannot read any tags the only thing it can display is the file name of max 8 symbols.
Thus i want to give each file a name according to a simple identification system . In order to accomplish this i add 2 tags to my flac files:
artistcodon - a 3 letter abreviation of the artist
titlecodon - a 5 letter abbreviation of the title
which i can use to tell foobar to make some tagless mp3s and name them %artistcodon%%titlecodon%.mp3
It was pretty easy to export a list of artistnames, manualy assign each a 3 letter code and format the list into an ifartisthenthiscode action group in notepad++
However im not going to manualy assign title codes to thousands of files. therefore i came up with this adequate solution:
copy title - get rid of all non letters/numbers - remove some small words (the, a, der, die (maybe i should find out if the german or the english word exists more often in my collection...), das, el, il, of, etc.) - upper case - remove spaces - replace any nonascii unicode character with single ascii char - remove all sequences of: the same letter repeated - if it is longer than 5 letters remove vowels (OEUIA in that order, it is as good as any other. and repeat the double letter removal in between each) - pad the result with 00000 at the end - cut it to 5 chars.
That should give me somewhat readable filenames, mostly without conflicts.
The problem:
How do i replace repeated chars with a single instance of said char? (so for example: ttt > t, mm > m)
i tried replace with regex:
find .{2,}
replace .
but that doesnt work at all.

