# ARTISTSORT for artists with "The", "A" and "An" on their names

**URL:** <https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046>\
**Category:** Support\
**Created:** [March 1, 2020, 5:22am UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046 "2020-03-01T05:22:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flamiusrex31](https://community.mp3tag.de/user_avatar/community.mp3tag.de/flamiusrex31/32/13185_2.png) [@Flamiusrex31](https://community.mp3tag.de/u/Flamiusrex31)\
**Post date:** [March 1, 2020, 5:22am UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046/1 "2020-03-01T05:22:57Z")

</div>

Hi, I'm new to the "Actions" feature and was hoping you can help me out with something:

I usually use ARTISTSORT to sort my music library, but I only fill that tag with artists their names start with "The", "A" or "An" (So, for example, I can find The Cure music filed under "C", not under "T"), and leave the rest of my music with that field empty.

I was trying to create an Action to tag my music using that parameter, but I can't figure it out yet. I found some Actions to remove those words but I don't know how to make it so MP3Tag only fills ARTISTSORT ONLY IF it finds them in the artist's name, otherwise leave the field empty.

Any help would be much apreciated

PS: Sorry If I can't make myself clear, English is not my first language

---

<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:** [March 1, 2020, 12:35pm UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046/2 "2020-03-01T12:35:00Z")

</div>

Use an action of the type "Format value" for ARTISTSORT  
Format string: `$if($less($len($regexp(%artist%,(The |An |A ).*,$1)),5),$regexp(%artist%,The |An |A (.*),$1),)`

---

<div class="post-metadata">

**Author:** ![Flamiusrex31](https://community.mp3tag.de/user_avatar/community.mp3tag.de/flamiusrex31/32/13185_2.png) [@Flamiusrex31](https://community.mp3tag.de/u/Flamiusrex31)\
**Post date:** [March 2, 2020, 3:00am UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046/3 "2020-03-02T03:00:02Z")

</div>

> [@ohrenkino](#):
>
> $if($less($len($regexp(%artist%,(The |An |A )._,$1)),5),$regexp(%artist%,The |An |A (._),$1),)

Thanks, man. Just what I wanted.

---

<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:** [March 2, 2020, 6:53am UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046/4 "2020-03-02T06:53:17Z")

</div>

Great.  
Still I wonder if it becomes really so much clearer to find  
A Flock of Seagulls under F where I would also see  
A Fine Selection  
later on under M  
A Man called Adam and not to forget  
A Taste of Honey.  
To be honest: I would have looked for them under A.

The only artist I have that starts with "An" is "An Horse" which look to me like a deliberate play with the grammar - so would a place in "H" be so much better?

I can see the reason for avoiding "the" as first word - but then it would be a challenge to cope with other languages and their articles (der, die, das, le, la, les, il etc.) as well ...

---

<div class="post-metadata">

**Author:** ![Flamiusrex31](https://community.mp3tag.de/user_avatar/community.mp3tag.de/flamiusrex31/32/13185_2.png) [@Flamiusrex31](https://community.mp3tag.de/u/Flamiusrex31)\
**Post date:** [March 3, 2020, 5:57am UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046/5 "2020-03-03T05:57:04Z")

</div>

Yeah, you have a point there. But I don't have many artists with "A" or "An", so is not that much of a problem to sort them the same way I sort artists with "The". I do it this way just for the sake of having an "standard" form of organizing my music.

I only listen to music in Spanish and English (I like to understand what I'm listening to; I'm willing to expand my "musical horizons" though), so I only have to add the articles "El", "La", "Los" and "Las" to the format string. Cases of artists with "Un" or "Una" (the spanish equivalents to "A/An") are very uncommon so it's not like I need to take them into account.

Anyway, thanks for the suggestions, I really appreciate your concerns. Maybe someday I'll considerate to change the way I sort things, but for now, I'm fine with my method.

---

<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:** [April 2, 2020, 5:57am UTC](https://community.mp3tag.de/t/artistsort-for-artists-with-the-a-and-an-on-their-names/48046/6 "2020-04-02T05:57:09Z")

</div>

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