# Exporting and importing multiline fields (.txt)

**URL:** https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860
**Category:** Support
**Created:** [June 28, 2014, 6:50pm UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860 "2014-06-28T18:50:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)
#### Post date: [June 28, 2014, 6:50pm UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/1 "2014-06-28T18:50:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 28, 2014, 6:53pm UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/2 "2014-06-28T18:53:30Z")

</div>

Treat the field, where you expect multiline data with a $replace() statement, e.g.  
$replace(%unsyncedlyrics%,$char(13)$char(10),#)  
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.

---

<div class="post-metadata">

### Author: ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)
#### Post date: [July 1, 2014, 5:37pm UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/3 "2014-07-01T17:37:07Z")

</div>

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")?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [July 2, 2014, 3:56am UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/4 "2014-07-02T03:56:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)
#### Post date: [May 14, 2015, 9:37pm UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/5 "2015-05-14T21:37:29Z")

</div>

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

$regexp(%unsyncedlyrics%,(\r\n|\n),♪)

Oh and, by the way, how can I also delete the language identifier used in MP3 lyrics ("[xxx||](https://community.mp3tag.de/t/15944/8)") 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.)

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [May 15, 2015, 3:45am UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/6 "2015-05-15T03:45:46Z")

</div>

> [@aax](#):
>
> Is there a way to replace line breaks regardless of their style (Windows CR+LF, Unix LF)? ...

**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♪'**

DD.20150515.0751.CEST

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [May 15, 2015, 4:18am UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/7 "2015-05-15T04:18:07Z")

</div>

> [@aax](#):
>
> ... how can I also delete the language identifier used in MP3 lyrics ("[xxx||](https://community.mp3tag.de/t/15944/8)") 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: $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}\|.\*\|',)**

DD.20150515.0818.CEST

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/exporting-and-importing-multiline-fields-txt/15860/8 "2026-02-09T12:25:06Z")

</div>


