multivalue tags for foobar2000 with discogs script


I have a problem at writing a script with multivalue tags for foobar2000.

Multivalue tags have to be seperated with "\\" in mp3tag and are read as "; " in foobar.
My Goal is to transform the ", " at Genre & Style at into "\\" in mp3tag and "; " in foobar.

I tried this with two different regexpreplace commands, but both had the same problem:

  • the script runs well, mp3 tag shows "\\"
  • but foobar shows also "\\" instead of "; " as it is supposed to do. it doesn't recognize the multivalue tag. instead it shows one genre tag like this "GenreA\\GerneB".
  • only after saving the mp3 again in mp3tag without any changes, foobar shows "; " correctly and recognizes the multivalue tag.

My two regexpreplace commands that worked so far where the following:

regexpreplace ", " "\\\\\\"    
regexpreplace ", " "\\\\\\\\"

Any idea where the problem lies? Is it my script or is it a problem of mp3tag? Are there any working scripts with multivalue tag?

Now, I know "" has a special function in mp3tag script language, so i tried with different repetitions of that sign, here are the results:
\ -> error message
\\ ->
\\ -> errror message
\\ ->
\\\ -> errror message
\\\ -> \\
\\\\ -> error message
\\\\ - > \\
\\\\\ -> error message
\\\\\ -> \\

My script can be seen here:
[WS] Discogs (pone mod)
Don't get confused by all the comment on the right side. I made them in respect to dano and his original script and documented every little change I made. The problem is in line 146.
(I changed only the seperator within discogs styles so far, of course the seperators between discogs style and discogs genre and within discogs genre will follow when it works. They are now seperatad by "; ")

I also read this similar problem of another user, but I don't think it is the same issue because in my case the tag is correctly recognized after another saving:

I use mp3tag v.45a and foobar2000 v0.9.6.9 (both newest)
The discogs release I experimentated with was this (but I don't think that makes a difference)

multivalue tags für foobar2000 mit discogs script
[WS] Discogs (pone mod)
Script for ripping genre, year & record label from

It's currently not possible without additional "Save tag"

I suggest
replace ", " "\\"
...doesn't look that extreme.


Without reading further on ... this is the right way.

Mp3tag uses the "\\" and foobar uses the "; " as a replacement just for displaying the binary separator for multiple values which otherwise cannot be shown to the user.

In the moment when a user writes a string "\\" into a Mp3tag field this string means nothing more than the string "\\" itself. In the moment when the complete tag is written to the file Mp3tag uses ID3 standard rules and converts this placeholder into the correct binary representation.

Other ID3 conform applications can read such binary values and use their own replacement character or string for displaying the mutiple values at the screen.


Web sources framework
"\\" für Multi-Value-Tags funktioniert nur bei manueller Eingabe

OK, so I have to stick with an additional saving which is not such a big problem.
Would be nice if mp3tag could be changed in such a way that the script itself recognizes "\\" (or any other symbol) as the placeholder for the binary separator of multiple value tags.

This works, thanks. Although I don't understand why
replace ", " "\\"
regexpreplace ", " "\\"

result in different output.

Thank you dano & DetlevD for you fast answers, very appreciated.


You could add a feature request for that.

In the web sources syntax, \ is used to escape i.e. "
This combines with the usual function of \ at regular expressions.