Exporting and importing multiline fields (.txt)

Is there any way to do this? I mean together with other fields, when backing up tags to text files.

Treat the field, where you expect multiline data with a $replace() statement, e.g.
This writes a # for every line break but creates a single line. In the target program you can then use replace to insert the linebreaks again.

I thought it would be somthing like that.
But isn't there a way to make Mp3tag recognize them automatically, like, for example, replacing line breaks with unicode values (I noticed that's what Mp3tag does automatically for non-ascii characters in "columns.ini")?

An automatism would require a knowledge about the target application. And as you do not have to export a bunch of fields but it is just as possible to export only one (e.g. that one with the linebreaks) it could just as well be that no further treatment is necessary.

As for the import: one line as a record per file, that is all there is. A linebreak would be treated as "end-of-record", so no avail.

Is there a way to replace line breaks regardless of their style (Windows CR+LF, Unix LF)? Would this regular expression replace work:


Oh and, by the way, how can I also delete the language identifier used in MP3 lyrics ("xxx||") when exporting? (I'm using the exported file as a tag backup, so they might end up being imported to FLAC or other formats in the future.)

Action: Format value Field: TEST Formatstring: $replace('line1'$char(13)$char(10)'line2'$char(13)'line3'$char(10)'line4'$char(13)$char(10)'line5'$char(10)'line6'$char(10),$char(13)$char(10),'',$char(13),'',$char(10),'') ==> 'line1line2line3line4line5line6' ... or ... Formatstring: $regexp('line1'$char(13)$char(10)'line2'$char(13)'line3'$char(10)'line4'$char(13)$char(10)'line5'$char(10)'line6'$char(10),'\r\n|\r|\n','') ==> 'line1line2line3line4line5line6' ... or ... Formatstring: $regexp('line1'$char(13)$char(10)'line2'$char(13)'line3'$char(10)'line4'$char(13)$char(10)'line5'$char(10)'line6'$char(10),'\R','') ==> 'line1line2line3line4line5line6' Note: The escape sequence \R matches any line ending character sequence, specifically it is identical to the expression ... (?>\D\A?|[\A-\C\x85\x{2028}\x{2029}]) ... or ... Formatstring: $regexp('line1'$char(13)$char(10)'line2'$char(13)'line3'$char(10)'line4'$char(13)$char(10)'line5'$char(10)'line6'$char(10),'\R','\x{266A}') ==> 'line1♪line2♪line3♪line4♪line5♪line6♪'


Action: Format value Field: TEST Formatstring: $regexp('eng|content descriptor|text text text','^.{3}\|.*\|(.*)$','$1') ... or ... Formatstring: $regexp('eng|content descriptor|text text text','^.{3}\|.*\|',) ==> 'text text text' Action: Format value Field: EXPORT_LYRICS Formatstring: $regexp(%UNSYNCEDLYRICS%,'^.{3}\|.*\|(.*)$','$1') ... or ... Formatstring: $regexp(%UNSYNCEDLYRICS%,'^.{3}\|.*\|',)