# Testing mp3tag behaviour

**URL:** <https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469>\
**Category:** Support\
**Created:** [July 26, 2018, 7:12pm UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469 "2018-07-26T19:12:14Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)\
**Post date:** [July 27, 2018, 8:35pm UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/21 "2018-07-27T20:35:44Z")

</div>

> [@sheepdisease](#):
>
> .....just because I copy the contents of the mta file into posts doesn't mean I created the action in that way. It's just a lot easier to show the contents this way.

Easier for you maybe. 😉 But few users know the "code" used in the mta file (I don't), so it is hard to know what the actions are and therefore difficult to give advice.

---

<div class="post-metadata">

**Author:** ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)\
**Post date:** [July 27, 2018, 9:21pm UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/22 "2018-07-27T21:21:07Z")

</div>

Well I can help with that.

T=Action  
T=1 'Case conversion'  
T=2 'Replace'  
T=3 Not listed in action types  
T=4 'Regular expression'  
T=5 'Format value'  
T=6 'Remove duplicate fields'  
T=7 'Guess values'  
T=8 'Merge duplicate fields'  
T=9 'Remove fields'  
T=10 'Remove fields except'  
T=11 'Convert codepage'  
T=12 'Import cover from file'  
T=13 'Export cover to file'  
T=14 'Import text file'  
T=15 'Export'  
T=16 'Split field by seperator'

F=Field

1=Original string  
2=Replace original string with  
3=0 Means 'only as whole word' and 'case-sensitive comparison' not selected  
3=1|0 Means 'only as whole word' selected and 'case-sensitive comparison' not selected  
3=0|1 Means 'only as whole word' not selected and 'case-sensitive comparison' selected  
3=1|1 Means 'only as whole word' selected and 'case-sensitive comparison' selected

---

<div class="post-metadata">

**Author:** ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)\
**Post date:** [July 27, 2018, 10:49pm UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/23 "2018-07-27T22:49:08Z")

</div>

@sheepdisease  
Maybe I wasn't blunt enough 🙂:  
It's not up to users to learn the "mta code", just because it is easier for you to post the file contents.  
But it is a good idea to describe questions, bugs, problems and suggestions in a form that is comfortable for the people who might help you.  
Maybe I'm wrong, but I doubt many users (maybe none) will take the time to apply the code in order to read your mta file.  
Of course, you can do what you want, but the form of the question often influences the number and quality of responses.

---

<div class="post-metadata">

**Author:** ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)\
**Post date:** [July 28, 2018, 5:10am UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/24 "2018-07-28T05:10:13Z")

</div>

When I pasted the code from my action group I wasn't expecting anyone to look through all of the code. It was more for reference if you could test it and see if you get different results compared to when you try something else which tests case in NTFS.

Let's look at a different action group, can you please explain what it is doing so I can learn from the example of natural mixed case?

 ![image](https://community.mp3tag.de/uploads/default/original/2X/d/d3b2b6726a0daba0dbdf84130bce17cc9c4e4abb.png)

Specifically the highlighted line.

For example, what is $Meta\_Sep? Is that a custom user field? I think it is, based on the line 'Remove fields' 'MERGED\_FIELDS'.

Where it refers to a field (like Artist) does ',\' replace that field with nothing or add one slash as a divider? I have never seen '~' used before, does it have a special function in regex/mp3tag or is it just a divider?

It looks like it deals with Artist, Composer, AlbumArtist slightly differently to Conductor, Album OrigAlbum & Title. What does it do to the latter?

Based on the following line it looks like it is adding a slash between the data so that all those fields get moved into the one field 'MERGED\_FIELDS'. Is that right?

Then there is the regular expression.

![image](https://community.mp3tag.de/uploads/default/original/2X/1/1de46757cf1d19001b804ccfed2a92c723c020f2.png)

I really do not understand how the numbers and letter U function in this as a replacement value. It looks like the numbers are used literally, else they would be proceeded by '$' if referring to positions of text but their combination and splitting with slashes does not make sense to me. All I know about this is that U is shorthand for non-uppercase and u is shorthand for uppercase.

Lastly, can you please explain how this format string works?

I have read that these are repeats but don't know how they work. All I know is what I saw on the help section of the website:

```
. matches any single character (wildcard)
* repeated any number of times including zero
? repeated zero or one times only

```

![image](https://community.mp3tag.de/uploads/default/original/2X/f/fa0e8515084d579c82159f80b0be42406591faf7.png)

Thank you for your patience and help, I do appreciate it.

---

<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 28, 2018, 7:58am UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/25 "2018-07-28T07:58:22Z")

</div>

> [@sheepdisease](#):
>
> what is $Meta\_Sep

See the help: [Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#metadata-functions)

---

<div class="post-metadata">

**Author:** ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)\
**Post date:** [July 28, 2018, 8:05am UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/26 "2018-07-28T08:05:06Z")

</div>

Thanks for that, that's the answer to the first question:

> $meta\_sep(x,sep) returns all values of field x (e.g. $meta\_sep(artist,; )). Multiple values of a field are separated by sep.

[https://community.mp3tag.de/uploads/default/original/2X/d/d3b2b6726a0daba0dbdf84130bce17cc9c4e4abb.png](https://community.mp3tag.de/uploads/default/original/2X/d/d3b2b6726a0daba0dbdf84130bce17cc9c4e4abb.png)

> [@sheepdisease](#):
>
> Where it refers to a field (like Artist) does ',' replace that field with nothing or add one slash as a divider? I have never seen '~' used before, does it have a special function in regex/mp3tag or is it just a divider?
> 
> It looks like it deals with Artist, Composer, AlbumArtist slightly differently to Conductor, Album OrigAlbum & Title. What does it do to the latter?
> 
> Based on the following line it looks like it is adding a slash between the data so that all those fields get moved into the one field 'MERGED\_FIELDS'. Is that right?
> 
> Then there is the regular expression.
> 
> ![image](https://community.mp3tag.de/uploads/default/original/2X/1/1de46757cf1d19001b804ccfed2a92c723c020f2.png)
> 
> I really do not understand how the numbers and letter U function in this as a replacement value. It looks like the numbers are used literally, else they would be proceeded by '$' if referring to positions of text but their combination and splitting with slashes does not make sense to me. All I know about this is that U is shorthand for non-uppercase and u is shorthand for uppercase.
> 
> Lastly, can you please explain how this format string works?
> 
> I have read that these are repeats but don't know how they work. All I know is what I saw on the help section of the website:
> 
> ```auto
> . matches any single character (wildcard)
> * repeated any number of times including zero
> ? repeated zero or one times only
> 
> ```
> 
> ![image](https://community.mp3tag.de/uploads/default/original/2X/f/fa0e8515084d579c82159f80b0be42406591faf7.png)

---

<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 28, 2018, 8:12am UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/27 "2018-07-28T08:12:28Z")

</div>

The other question is: do you have multi-value fields at all? So is it necessary to treat them?

---

<div class="post-metadata">

**Author:** ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)\
**Post date:** [July 28, 2018, 8:15am UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/28 "2018-07-28T08:15:38Z")

</div>

Is that what the script does at the point I highlighted a line in the screenshot? It takes the field values and combines them for easy treatment before changing back and removing any trace of 'MERGED\_FIELDS'?

The point is that I want to learn about functionality in practice and looking at examples is a good way to do this. Even if I don't actually implement the action, it will help me learn and understand, I just need some more information from someone who already understands what I don't.

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [January 6, 2021, 2:30pm UTC](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469/30 "2021-01-06T14:30:28Z")

</div>



[Previous page](https://community.mp3tag.de/t/testing-mp3tag-behaviour/42469.md?page=1)
