Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.
Also make sure you've read the Forum Guidelines before posting in this forum.
![]() ![]() |
Jun 29 2012, 17:50
Post
#1
|
|
|
Member Group: Members Posts: 4 Joined: 8-June 12 Member No.: 16558 Mp3tag Version: 2.51 |
I am undertaking a major re-tagging exercise and wish to standardise Artist entries in the format 'Last name, First Name'. At present a huge number of entries are in the format 'First name, Last Name' and I want to change all of these so that. for example, 'John Coltrane' becomes 'Coltrane, John'.
Is there a way I can set up an action to automate this? |
|
|
|
Jun 29 2012, 17:56
Post
#2
|
|
![]() Member Group: Full Members Posts: 4130 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
... 'First name, Last Name' and I want to change all of these so that. for example, 'John Coltrane' becomes 'Coltrane, John'. Read there ... http://forums.mp3tag.de/index.php?showtopi...ost&p=44592 http://forums.mp3tag.de/index.php?showtopi...ost&p=16329 http://forums.mp3tag.de/index.php?showtopi...ost&p=58793 http://forums.mp3tag.de/index.php?showtopi...ost&p=59176 Action: Format value Field: ARTIST Format string: $regexp(%ARTIST%,'([^;]+)(\s[^;]+)','$2, $1') From: "Rolling Stones" To: " Stones, Rolling" From: "John Lewis;Mick Jagger;Ringo Harrison" To: " Lewis, John; Jagger, Mick; Harrison, Ringo" DD.20120629.1914.CEST This post has been edited by DetlevD: Jun 30 2012, 10:09 -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Jun 30 2012, 08:56
Post
#3
|
|
|
Member Group: Members Posts: 4 Joined: 8-June 12 Member No.: 16558 Mp3tag Version: 2.51 |
Read there ... http://forums.mp3tag.de/index.php?showtopi...ost&p=44592 http://forums.mp3tag.de/index.php?showtopi...ost&p=16329 http://forums.mp3tag.de/index.php?showtopi...ost&p=58793 http://forums.mp3tag.de/index.php?showtopi...ost&p=59176 Action: Format value Field: ARTIST Format string: $regexp(%ARTIST%,'([^;]+)(\s[^;]+)','$2, $1') From: Rolling Stones To: Stones, Rolling From: John Lewis;Mick Jagger;Ringo Harrison To: Lewis, John; Jagger, Mick; Harrison, Ringo DD.20120629.1914.CEST Many Thanks, DetlevD. Unfortunately at present the Action leaves me with a leading space at the beginning of the new name, which of course means that my control point now puts it at the beginning of the alphabetical sort. I have experimented but can't work out how to amend the format to ensure that there is no leading space in the new name. |
|
|
|
Jun 30 2012, 10:01
Post
#4
|
|
![]() Member Group: Full Members Posts: 4130 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
Many Thanks, DetlevD. Unfortunately at present the Action leaves me with a leading space at the beginning of the new name, which of course means that my control point now puts it at the beginning of the alphabetical sort. I have experimented but can't work out how to amend the format to ensure that there is no leading space in the new name. Have a look at the trim functions $trim, $trimLeft, $trimRight to remove surrounding spaces. Try this ... for only one artist name $regexp(%ARTIST%,'([^;]+)\s([^;]+)','$2, $1') Try this ... for multiple artist names $trimLeft($regexp(%ARTIST%,'([^;]+)(\s[^;]+)','$2, $1')) ... or ... $trimLeft($regexp(%ARTIST%,'([^;]+)\s([^;]+)',' $2, $1')) DD.20120630.1120.CEST This post has been edited by DetlevD: Jun 30 2012, 11:51 -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Jun 30 2012, 11:39
Post
#5
|
|
|
Member Group: Members Posts: 4 Joined: 8-June 12 Member No.: 16558 Mp3tag Version: 2.51 |
That worked fine, DetlevD. It will save me an enormous amount of work. Many Thanks for your help.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 11:53 |