Move THE to end of artist tag

First, thanks for this great software.
I have searched the various topics but cannot find an answer for this...

I want to move all the word THE at the beginning of all ARTIST fields to become (The) at the end of the field.
I can use the tool to change the case OK, but how do you move the word to the end of the ARTIST name?
So becomes <STONE ROSES (The)>.

Many thanks

Use a 'Replace with regular expression' action.

Action type: Replace with regular expression
Field: ARTIST
Regular expression: ^(the)\s(.+)$
Replace matches with: $2 ($1)
[ ] case-sensitive comparison

If you also want to treat other leading articles the same way, use a regular expression similar to this one. Add or remove articles as you like, separating them with a vertical bar (pipe) character:

^(the|el|los|la|las|le|les)\s(.+)$

Set the Mp3tag Filter: "$left(%ARTIST%,4)" IS "THE "
Note: The filter works case insensitive.

Action: Format value
Field: ARTIST
Formatstring: $cutLeft(%ARTIST%,4)' (The)'

From:
THE STONE ROSES
To:
STONE ROSES (The)

DD.20111202.2059.CET
Edit.DD.20111202.2136.CET

1 Like

I'd be very careful about doing it like this. You wouldn't want to run this on any names don't start with 'the'. The action that I listed in the first reply won't alter any artist name that doesn't start with 'the'. It also has the flexibility to work with other articles by using the second regex shown in the reply.

Yes, you are right, I've edit my post to make sure to apply the fitting filter as the first step.

DD.20111202.2140.CET

That worked well JJ Johnson, thank you very much

Me too. Is this script put in one location or is it via several tool function?

I am new to the part of Mp3Tag.
Thanks,

See the FAQs on actions: /t/967/1

and also on your direct question:
Simple switch in the same field