# Complicated Field Editing Format

**URL:** https://community.mp3tag.de/t/complicated-field-editing-format/45933
**Category:** Support
**Created:** [July 18, 2019, 7:55am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933 "2019-07-18T07:55:16Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 7:55am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/1 "2019-07-18T07:55:16Z")

</div>

Hello MP3TAG Community, I've recently done very basic tag edits with the help of this community. I'm now looking to create my ideal "End All Be All" tool. I've always put my files into a particular format that I find most suitable for viewing.  
For clarity's sake, I will show a template and a few examples. _One thing to note is that not all songs being edited are remixes, but I choose to show the remix portion in the template because it is integral to many songs in my library, particularly electronic artists._

* * *

```
Template:

```

**FILENAME:** (Identical to **TITLE** )  
**TITLE:** {song name} [\_\_\_\_\_ Remix]  
**ARTIST:** {All vocal and remix artists}  
**ALBUM:** {Album name with no **EP** or **-**  **Single** in name}

For clarification, the challenges I'm facing and unsure about are

- Adding the **Feat. artist** as well as the **remix artist** to the **ARTIST** tag (including when there are multiple of either - I'll give an example).
- Removing **EP** , **-**  **EP** , **-**  **Single** , or **Single** from the **ALBUM** field.
- Changing all parenthesis to brackets _ONLY_ in the **\_\_\_\_\_ Remix** or **\_\_\_\_\_ Mix** portion, around **Acoustic** or **Acoustic Version** , or around **Demo** within the **TITLE** field
- Changing all parenthesis to brackets in the **ALBUM** field

* * *

```
Example 1: Intense remix with multiple remix artists

```

**FILENAME:** 10 All My Love (feat. Conor Maynard) (BOXINBOX & Lionsize Remix)  
**TITLE:** All My Love (feat. Conor Maynard) (BOXINBOX & Lionsize Remix)  
**ARTIST:** Cash Cash  
**ALBUM:** All My Love (feat. Conor Maynard) (Remixes EP)  
\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< **Would Change To** \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>  
**FILENAME:** All My Love [BOXINBOX & Lionsize Remix]  
**TITLE:** All My Love [BOXINBOX & Lionsize Remix]  
**ARTIST:** Cash Cash\\BOXINBOX\\Lionsize  
_(I believe that the double backslash is a divider in MP3TAG)_  
**ALBUM:** All My Love [Remixes]

* * *

```
Example 2: Using "Mix" not "Remix" and having 2 artists in the field PRIOR to edit

```

**FILENAME:** 05 Only (Richard X Mix)  
**TITLE:** Only (Richard X Mix)  
**ARTIST:** Nine Inch Nails\\Other Artist  
**ALBUM:** Every Day Is Exactly The Same (Remixes)  
\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< **Would Change To** \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>  
**FILENAME:** Only [Richard X Mix]  
**TITLE:** Only [Richard X Mix]  
**ARTIST:** Nine Inch Nails\\Other Artist\\Richard X  
**ALBUM:** Every Day Is Exactly The Same [Remixes]

* * *

```
Example 3: Leaving title-related parenthesis, switching album parenthesis to brackets

```

**FILENAME:** 02 Absolutely (Story Of A Girl)  
**TITLE:** Absolutely (Story Of A Girl)  
**ARTIST:** Four Year Strong  
**ALBUM:** Explains It All (10 Year Anniversary Edition)  
\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< **Would Change To** \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>  
**FILENAME:** Absolutely (Story Of A Girl)  
**TITLE:** Absolutely (Story Of A Girl)  
**ARTIST:** Four Year Strong  
**ALBUM:** Explains It All [10 Year Anniversary Edition]

* * *

```
Example 4: All together now (purposefully exaggerated to encompass everything)

```

**FILENAME:** 11 Twin Skeleton's (Hotel In NYC) (Feat. Joey Bada$$) (Remix) (Acoustic)  
**TITLE:** Twin Skeleton's (Hotel In NYC) (Feat. Joey Bada$$) (Remix) (Acoustic)  
**ARTIST:** Fall Out Boy  
**ALBUM:** American Beauty/American Psycho (Remixes)  
\<\<\<\<\<\<\<\<\<\<\<\<\<\<\< **Would Change To** \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>  
**FILENAME:** Twin Skeleton's (Hotel In NYC) [Remix] [Acoustic]  
**TITLE:** Twin Skeleton's (Hotel In NYC) [Remix] [Acoustic]  
**ARTIST:** Fall Out Boy\\Joey Bada$$  
**ALBUM:** American Beauty/American Psycho [Remixes]

* * *

My collection of music has amassed over 10,000 albums and I've been using a partial fix formatting code (which helps!) but I've made it through around 2000 albums in about 3 days of strenuous work. If I had a functioning action set to yield results like these I might be able to sleep soundly at night!  
**Any help from you MP3TAG masters out there would be GREATLY appreciated!**

---

<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 18, 2019, 9:25am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/2 "2019-07-18T09:25:18Z")

</div>

I would start with the easy bits, e.g. replace the text contants.  
Like replace "(Remix)" with "[Remix]" ore remove "EP" from ALBUM.  
This would make it much easier to deal with several sets of parenthesis in one string.

> [@kramerman342](#):
>
> **ARTIST:** Cash Cash\BOXINBOX\Lionsize  
> _(I believe that the double backslash is a divider in MP3TAG)_

Yes and no. The `\\` is an indicator for a multi-value field, i.e. you have several fields of the same type, here ARTIST. I don't know if you really want that as only very few players can deal with multi-value fields. WMP does not, iTunes sometimes.  
Some players tread the characters semicolon-blank as internal separator; in MP3tag you see all the data in a single field. WMP uses that, iTunes does not.

So the question is: do you really want to create multi-value fields? If so, you probably see the contents only in MP3tag.

> [@kramerman342](#):
>
> **FILENAME:** (Identical to **TITLE** )

Create the filename from the tag fields. Use Convert\>Tag-Filename for that.  
There are numerous threads in this forum that deal with the shifting of the featured artist between fields. Moving the featured artist to the ordinary artist field will not let you distinguish any more who the real artist is and who the remixer or the featured one is.  
Moving the remix artist to artist has the same drawbacks. There is a field called MIXARTIST - perhaps that is more suitable (yet, hardly any player shows it), but it is much easier to create unstructured data from structured fields than the other way round, also, as before, you loose the information who is artist and who is mix artist.

Perhaps one other task: to replace the round brackets with square ones for a Remix, try an action of the type "Format value" for TITLE  
Format string: `$regexp(%title%,.*\((.*?Remix)\),'['$1']')`

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 9:44am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/3 "2019-07-18T09:44:53Z")

</div>

Thank you for your quick response yet again!  
I appreciate the attention to detail with the multiple fields part. I do wish to create multiple value fields for the artists involved in a track as I use MusicBee and can see them all (even if my phone player will not show all of them), however I do like the idea of using the MIXARTIST field for any remix artists involved in a track. Will this field work if there are multiple remix artists?

Additionally, how might I call back the rest of the title? When using the Format String you provided, the replacement '['$1']' portion only yields "[\_\_\_\_ Remix]", not the rest of the track's title.

---

<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 18, 2019, 9:49am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/4 "2019-07-18T09:49:26Z")

</div>

> [@kramerman342](#):
>
> Additionally, how might I call back the rest of the title? When using the Format String you provided, the replacement '['$1']' portion only yields "[\_\_\_\_ Remix]", not the rest of the track's title.

Oops, yes, sorry, it should be:  
`$regexp(%title%,(.*)\((.*?Remix)\),$1'['$2']')`

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 10:25am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/5 "2019-07-18T10:25:33Z")

</div>

Excellent! That worked perfectly. Now I have tried using an older post to help with the next part of moving the featured artist over (you were directly involved in getting me to this format string in fact), and while I do not understand it, it seems to get me somewhat close to a desired result.

> [@how to move (feat.) from title to artist - HELP](https://community.mp3tag.de/t/how-to-move-feat-from-title-to-artist-help/11512/2):
>
> **artist: Akon**
> 
> Title: Give It To Em feat. Rick Ross
> 
> i want to make like this:
> 
> **artist: Akon & Rick Ross**
> 
> title: Give It To Em
> 
> Create an action group that has the following actions
> 
> 1 - Action to copy the feat artist from title to artist:  
> Format tag field  
> Field: artist  
> String: %artist% & $mid(%title%,$add($strstr(%title%,'Feat.'),6),$len(%title%))

And using an adapted version from my slight understanding, I attempted to change it to fit my goal here. I just did this:  
Field: artist  
String: %artist%\\$mid(%title%,$add($strstr(%title%,'Feat.'),6),$len(%title%))

From this:  
\*\*ARTIST:\*\*Cash Cash\\Dashboard Confessional  
\*\*TITLE:\*\*Belong (feat. Conor Maynard) [BEAUZ Remix]  
\<\<\< To This \>\>\>  
\*\*ARTIST:\*\*Cash Cash\\g (feat. Conor Maynard) [BEAUZ Remix]  
\*\*TITLE:\*\*Belong (feat. Conor Maynard) [BEAUZ Remix]  
I'm positive that I'm just not understanding this, but do you believe this it workable?

I also tried using a guess value using  
Source Format: %title%  
Guessing Pattern: %title% (feat. %artist%)  
**Which yielded no change**  
and  
Source Format: %title%  
Guessing Pattern: %title% (feat. %artist%  
**Which yielded this:**  
\*\*ARTIST:\*\*Conor Maynard) [BEAUZ Remix]  
\*\*TITLE:\*\*Belong  
Which doesn't really seem any closer to my goal.

---

<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 18, 2019, 10:47am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/6 "2019-07-18T10:47:08Z")

</div>

Please note the strings in the action of the type "Guess value" are case sensitive. So if you use "feat" but you have "Feat" in the TITLE, then you will get no hit.

The $mid() function goes to the position where it finds the named string and then used the rest of the TITLE - which is too much.  
To get only the part of the featured artist try:  
`$regexp(%title%,.*\(feat\. (.*?)\).*,$1)`  
This should strip it down to "Conor Maynard"

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 11:15am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/7 "2019-07-18T11:15:59Z")

</div>

```
$regexp(%title%,.*\(feat\. (.*?)\).*,%artist%\\\\$1)

```

This ALMOST worked wonders for me. For songs with only one artist going into this, it will be perfect. For a few particular songs, like this  
**Title:** Belong (feat. Conor Maynard) [BEAUZ Remix]  
**Artist:** Cash Cash\\Dashboard Confessional  
It strips the second artist, resulting in this:  
**Title:** Belong (feat. Conor Maynard) [BEAUZ Remix]  
**Artist:** Cash Cash\\Conor Maynard  
Which is close! (And even perfect for most tracks!) Any ideas on how to _not_ get rid of the already existing additional artists?

---

<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 18, 2019, 11:24am UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/8 "2019-07-18T11:24:13Z")

</div>

If you have multi-value fields, it is advisable to use  
`$meta_sep(x,sep)` to list all values of that field type,  
e.g. Format value for ARTIST  
`$meta_sep(artist,\\)\\$regexp...`  
(complete the $regexp... with what you used before)

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 12:08pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/9 "2019-07-18T12:08:17Z")

</div>

Great! so by using  
`$meta_sep(artist,\\)\\$regexp(%title%,.*\(feat\. (.*?)\).*,$1)`  
I have now got  
**Title:** Belong (feat. Conor Maynard) [BEAUZ Remix]  
**Artist:** Cash Cash\\Dashboard Confessiona\\Conor Maynard  
This is another step closer!

Furthermore, by using Format Value  
**Field:** MIXARTIST  
**Format String:** `$regexp(%title%,.*\'['(.*?)Remix\']',$1)`  
I was able to set the **MIXARTIST** you mentioned before.

Following that, using what you taught me in my last post, I used  
`$regexp(%title%, \(feat.*?\),)`  
and was left with just  
**Title:** Belong [BEAUZ Remix]  
**Artist:** Cash Cash\\Dashboard Confessional\\Conor Maynard  
**MixArtist:** BEAUZ

This is (to me) GREAT progress from where we started!

---

<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 18, 2019, 12:10pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/10 "2019-07-18T12:10:55Z")

</div>

I hoped that the double backslash would separate the multivalue field straight away.  
If it does not, then use an action of the type "Split field by separator" for ARTIST.

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 12:18pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/11 "2019-07-18T12:18:37Z")

</div>

It absolutely did! No need to change that part! Now, I believe it's just some easier fine tuning with the album names (the - EP, EP, -Single, Single stuff as well as changing to brackets) and then the simple Tag(TITLE) - FILENAME conversion as well as recognizing "Acoustic", "Acoustic Version", "Live", and "Demo". Each of these tasks is very similar to what you've already shown me, but I'll chime back in if I'm having trouble. I can't thank you enough. You've already saved me hours upon hours. GUARANTEED.

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 1:08pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/12 "2019-07-18T13:08:57Z")

</div>

Ah, I've come across an issue. If the Format Value actions that identify the ARTIST and MIXARTIST  
`$meta_sep(artist,\\)\\$regexp(%title%,.*\(feat\. (.*?)\).*,$1)`  
and  
`$regexp(%title%,.*\'['(.*?)Remix\']',$1)`  
respectively, they will just substitute the track name (which is problematic). For example, while the track I am about to mention has no need to be changed, there will be many like it in the batches of files I go through I will need my two other Format Value functions to not capture and move the entirety of the song names:

* * *

**Title:** Talk Slow  
**Artist:** Chase Atlantic  
 ![Formatting%20Functions](https://community.mp3tag.de/uploads/default/original/2X/d/dba1137febd53dadd3f79185cf01136739e162d6.jpeg)  
Results in  
**Title:** Talk Slow  
**Artist:** Chase Atlantic\\Talk Slow  
**MixArtist:** Talk Slow  
Any ideas on how to update those other functions so that this does not happen?

---

<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 18, 2019, 2:04pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/13 "2019-07-18T14:04:53Z")

</div>

The easiest way would be to use filters so that you get only those files that should be treated  
like  
%title% HAS "(feat." OR %title% HAS "mix)"

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 3:33pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/14 "2019-07-18T15:33:26Z")

</div>

Alrighty, since some of these files are already formatted a bit, while using batch edit, it ended up placing a artist into the artist into the artist field that was already there. it how would you go about getting rid of repeats in the artist field? For example:  
**ARTIST:** `Cash Cash\\Conor Maynard\\Sagan\\Conor Maynard`

---

<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 18, 2019, 4:01pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/15 "2019-07-18T16:01:29Z")

</div>

> [@kramerman342](#):
>
> how would you go about getting rid of repeats in the artist field?

Here is a thread that deals with duplicates in multi-value fields:

> [@Removing duplicate fields](https://community.mp3tag.de/t/removing-duplicate-fields/9430):
>
> Hi! I'm using multiple genre fields on my mp3, and as a lot of players don't handle it that well, I'm using as well a generic genre, stored in "grouping", that I wanted to add as first genre. (usually, players that don't deal with multiple genre fields just use the first one available, which is perfect). Sooo... Basically, if the first genre is already the same that grouping, I don't have anything to do. But if different, I wanted my genre field to be grouping\\genre1\\genre2\\... To do so…

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 5:27pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/16 "2019-07-18T17:27:06Z")

</div>

I'm sorry, I can't seem to get that method to work.  
I used `$regexp($meta_sep(artist,\\),'(?<=\\|^)([^\\]*)(\\\1)+(?=\\|$)',$1)`  
Which resulted in an error  
Alternatively, I've attempted to use the action "Merge duplicate fields" and used `\\` as the separator to no avail.

---

<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 18, 2019, 5:42pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/17 "2019-07-18T17:42:09Z")

</div>

It looks as though the forum formatter has swallowed some of the characters.  
I found another thread that also deals with duplications:

> [@Merge duplicate words](https://community.mp3tag.de/t/merge-duplicate-words/16289/3):
>
> You want to keep the first value. That's more complicated. [Edit:] Action: Format value Field: Genre Format string: $regexp($reverse($regexp($regexp($reverse($regexp($regexp(%Genre%,'^(\s+;\*|\s\*;+)+|(\s+;\*|\s\*;+)+$|((?\<=;)\s+)|(\s+(?=;))',),'^|$',';')),'(;[^;]+)(?=(\1|;.\*?\1))',),'^;+|;+$',)),'(?\<=;)',' ') Replace Genre with any other tag and it will remove duplicates too. This action "fixes" first the multiple value string (remove multiple spaces after ; separator). It will add exac…

it uses the semicolon as separator, so I used it for the $meta\_sep()  
and it suggests such a  
Format string: `$regexp($reverse($regexp($regexp($reverse($regexp($regexp($meta_sep(artist,;),'^(\s+;|\s;+)+|(\s+;|\s;+)+$|((?<=;)\s+)|(\s+(?=;))',),'^|$',';')),'(;[^;]+)(?=(\1|;.*?\1))',),'^;+|;+$',)),'(?<=;)',' ')`

---

<div class="post-metadata">

### Author: ![kramerman342](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kramerman342/32/6650_2.png) [@kramerman342](https://community.mp3tag.de/u/kramerman342)
#### Post date: [July 18, 2019, 5:49pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/18 "2019-07-18T17:49:01Z")

</div>

> [@ohrenkino](#):
>
> $regexp($reverse($regexp($regexp($reverse($regexp($regexp($meta\_sep(artist,;),'^(\s+;|\s;+)+|(\s+;|\s;+)+$|((?\<=;)\s+)|(\s+(?=;))',),'^|$',';')),'(;[^;]+)(?=(\1|;.\*?\1))',),'^;+|;+$',)),'(?\<=;)',' ')

Perfect.  
Man you are a lifesaver (and SERIOUSLY quick!)

---

<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: [August 17, 2019, 5:49pm UTC](https://community.mp3tag.de/t/complicated-field-editing-format/45933/19 "2019-08-17T17:49:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
