# ARTISTSORT: The Beatles, Billy Preston

**URL:** <https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263>\
**Category:** Support\
**Created:** [December 19, 2020, 7:11am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263 "2020-12-19T07:11:50Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 19, 2020, 7:11am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/1 "2020-12-19T07:11:50Z")

</div>

Hello guys.  
My goal this time is to create an **action set that will turn [The Beatles, Billy Preston] into [Beatles, Billy Preston, The] using regular expression**. I have referred the previous post and his method doesn't cover mine. Unfortunately, I'm not yet adept on using the format string method therefore am once again requiring your support.

arrangement:  
[1]The [2]Beatles(,) [3]Billy [4]Preston  
into:  
[2]Beatles(,) [3]Billy [4]Preston(,) [2]The

Link: [Share your custom Actions](https://community.mp3tag.de/t/share-your-custom-actions/1722/35)

---

<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:** [December 19, 2020, 7:43am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/2 "2020-12-19T07:43:32Z")

</div>

To be honest: do you really have to move the "The" to the end? If the new string is used for sorting, then I bet it would be enough to simply delete the "The".  
In respect to the regular expression:  
Search string: `The (.*)`  
Replace string: `$1, The`

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 19, 2020, 8:02am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/3 "2020-12-19T08:02:21Z")

</div>

Huhuhu don't be angry at me sensei, I have no idea how to delete that. But you have a really solid point.

I'll re-do my action set.

---

<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:** [December 19, 2020, 8:10am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/4 "2020-12-19T08:10:12Z")

</div>

I am not angry or so , no, really not.  
I just sometimes wonder why things should be so overcomplicated.

To get rid of the leading "The", you could try:  
An Action of the type "Replace with regular expression" for ARTISTSORT  
Search string: `^The_`  
(The \_ = space)  
Replace string:  
(leave empty)

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 19, 2020, 8:23am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/5 "2020-12-19T08:23:26Z")

</div>

Sensei, my solution goes:  
$1 = The  
$2 = Beatles(,)  
$3 = Billy  
$4 = Preston

Merge duplicate with ", "  
Format ARTISTSORT from %artist%  
Regular expression: ^(.+)\s(.+)\s(.+)\s(.+)$  
Replace matches: $2 $3 $4  
Split ARTIST with ","

it yields Artist Sort: Beatles, Billy Preston

Is this efficient in your opinion?

---

<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:** [December 19, 2020, 8:55am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/6 "2020-12-19T08:55:43Z")

</div>

Have you tried my suggestions?  
They look shorter.

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 19, 2020, 12:10pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/7 "2020-12-19T12:10:30Z")

</div>

No I haven't. In my understanding, your solution only applies if we're dealing with The Beatles only, or something similar. Does it work with a second artist in the field together? Excuse me if I'm slow in following I'm learning this bit by bit and just prodding and trying things.

---

<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:** [December 19, 2020, 2:29pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/8 "2020-12-19T14:29:15Z")

</div>

Well, if you have not tried them why am I bothering?

> [@Alfie\_Solomon84](#):
>
> your solution only applies if we're dealing with The Beatles only

I don't read anything about the Beatles in my suggestion just the pattern of a string which starts with "The" and that "The" is moved to the end or gets deleted.  
That works for every string with that pattern, regardless how many words, commas, hyphens, you name it, are following the "The".

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 19, 2020, 2:31pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/9 "2020-12-19T14:31:02Z")

</div>

AHHHH gotcha. Thanks for the explanation. Many thanks for incessantly assisting me.

God bless, stay safe.

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 24, 2020, 2:30am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/10 "2020-12-24T02:30:57Z")

</div>

It's me again sensei, I tried your solution. It didn't work. Is there anything that I'm doing wrong?  
 ![Screenshot 2020-12-24 103013](https://community.mp3tag.de/uploads/default/original/2X/c/c80c9dd6fe393fa24d76e6512191928ab7426902.png)

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [December 24, 2020, 5:17am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/11 "2020-12-24T05:17:56Z")

</div>

> [@Alfie\_Solomon84](#):
>
> Is there anything that I'm doing wrong?

You wrote an underscore instead of a space.

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 24, 2020, 6:37am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/12 "2020-12-24T06:37:25Z")

</div>

I changed it. Still the same. Any clue?

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [December 24, 2020, 8:01am UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/13 "2020-12-24T08:01:47Z")

</div>

It works here.  
Is it really the field ARTISTSORT you are treating or is it the field ARTIST?  
What is the present content of ARTISTSORT?

If you have only filled ARTIST and want to move the content from ARTIST without "The" to the field ARTISTSORT take the converter Tag-\>Tag:  
Field: ARTISTSORT  
Formatstring: $regexp(%artist%,^The ,)

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 24, 2020, 12:24pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/14 "2020-12-24T12:24:02Z")

</div>

the field I'm treating is the ARTISTSORT, and I have already format value from ARTIST.

---

<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:** [December 24, 2020, 1:23pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/15 "2020-12-24T13:23:42Z")

</div>

Then please check your search terms.  
The expression is correct and works for cases with a leading "The" plus a space character following it.

---

<div class="post-metadata">

**Author:** ![Alfie\_Solomon84](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@Alfie\_Solomon84](https://community.mp3tag.de/u/Alfie_Solomon84)\
**Post date:** [December 24, 2020, 2:24pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/16 "2020-12-24T14:24:47Z")

</div>

Solved. Thank you @poster and sensei @ohrenkino!

---

<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:** [January 23, 2021, 2:24pm UTC](https://community.mp3tag.de/t/artistsort-the-beatles-billy-preston/51263/17 "2021-01-23T14:24:50Z")

</div>

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