The title says it all. Apart from my spelling mistake.
You can use an action "Replace with Regular Expression" for that, where the two topics linked here explain which regular expressions to use.
I am still not sure if putting of the word "the" to the end is a good idea.
My favourite example for this is "The The".
And doesn't "Artist formerly known as Prince, the" look absolutely weird?
To my observation do most players ignore articles anyway - and that even better with also various definite and indefinite articles across languages.
I think that a good compromise is to fill the fields for ARTIST and ARTISTSORT:
ARTIST then has the orginal artist name and ARTISTSORT features the string that is used for sorting.