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.
![]() ![]() |
Jul 5 2012, 13:23
Post
#1
|
|
|
Member Group: Full Members Posts: 7 Joined: 10-November 11 Member No.: 15562 Mp3tag Version: 2.51 |
I would like to transform:
"Example Song feat. Someone" into "Example Song (feat. Someone)" I already Googled it and used this code, but replaced "ARTIST" with "TITLE" (and, for aesthetic reasons, "Feat." with "feat."). The only problem was that it put ')' after any song, not just those songs that had featured artists. I obviously could select only the songs that I need to transform, but I figured some of you might've seen this problem before and already have a solution for this. Anyhow, hope you guys have the answer. This post has been edited by a10818264@nepwk.com: Jul 5 2012, 22:32 |
|
|
|
Jul 5 2012, 17:20
Post
#2
|
|
![]() Member Group: Full Members Posts: 3140 Joined: 9-December 09 From: Norddeutschland / Northern Germany Member No.: 11458 Mp3tag Version: 2.55a |
... Anyhow, hope you guys have the answer. Yes, as it says in one of mentioned posts: use a filter. -------------------- 42 - wie war die Frage / what was the question / comment était la question
|
|
|
|
Jul 5 2012, 18:20
Post
#3
|
|
![]() Member Group: Full Members Posts: 4129 Joined: 26-May 06 From: Wuppertal, Germany, Planet Earth Member No.: 3194 Mp3tag Version: 2.54 |
... I already Googled it ... Caution: This link is misleading. It does not link to Google. DD.20120705.1920.CEST -------------------- * Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥ |
|
|
|
Jul 5 2012, 22:42
Post
#4
|
|
|
Member Group: Full Members Posts: 7 Joined: 10-November 11 Member No.: 15562 Mp3tag Version: 2.51 |
|
|
|
|
Jul 6 2012, 02:45
Post
#5
|
|
![]() Member Group: Full Members Posts: 404 Joined: 3-December 10 From: Ireland Member No.: 13334 Mp3tag Version: 2.54 |
I would like to transform: "Example Song feat. Someone" into "Example Song (feat. Someone)" First use a filter like: "TITLE" HAS "feat." Then create an action: Begin Action Group _Script Test#TEST Action #1 Actiontype 5: Format value Field ______: TITLE Formatstring: $regexp(%TITLE%,'(.+)[^\(]((?=feat\.).+)','$1 ($2)') End Action Group _Script Test#TEST (1 Action) Examples of results: FROM >>> TO Example Song feat. Someone >>> Example Song (feat. Someone) fgdgf feat. fsdfsdfl;jyigihkhiutt8y9o >>> fgdgf (feat. fsdfsdfl;jyigihkhiutt8y9o) Example Song (feat. Someone) >>> Example Song (feat. Someone) Example Song feat Someone >>> Example Song feat Someone **Doesn't match 'feat' Example Song Someone >>> Example Song Someone Example Song (Someone) >>> Example Song (Someone) This post has been edited by stevehero: Jul 6 2012, 02:46 -------------------- I ♥ singing Dubstep ♪♫WOOB WOOB WOOB WOOB UBB OHMOMOMO DROP WOOOOOOB WOOB WOOB WOOB WUB WUB WUB WUB WUB WUB WUB WUB MOMOMO WOOB WOOB♫♪
|
|
|
|
Jul 6 2012, 15:09
Post
#6
|
|
|
Member Group: Full Members Posts: 7 Joined: 10-November 11 Member No.: 15562 Mp3tag Version: 2.51 |
First use a filter like: "TITLE" HAS "feat." Then create an action: Begin Action Group _Script Test#TEST Action #1 Actiontype 5: Format value Field ______: TITLE Formatstring: $regexp(%TITLE%,'(.+)[^\(]((?=feat\.).+)','$1 ($2)') End Action Group _Script Test#TEST (1 Action) Examples of results: FROM >>> TO Example Song feat. Someone >>> Example Song (feat. Someone) fgdgf feat. fsdfsdfl;jyigihkhiutt8y9o >>> fgdgf (feat. fsdfsdfl;jyigihkhiutt8y9o) Example Song (feat. Someone) >>> Example Song (feat. Someone) Example Song feat Someone >>> Example Song feat Someone **Doesn't match 'feat' Example Song Someone >>> Example Song Someone Example Song (Someone) >>> Example Song (Someone) This works splendidly! ![]() (It really isn't even necessary to run a filter: all the other songs remain unchanged.) This post has been edited by a10818264@nepwk.com: Jul 6 2012, 15:14 |
|
|
|
Jul 6 2012, 15:19
Post
#7
|
||
![]() Member Group: Full Members Posts: 404 Joined: 3-December 10 From: Ireland Member No.: 13334 Mp3tag Version: 2.54 |
This works splendidly! ![]() (It really isn't even necessary to run a filter: all the other songs remain unchanged.) yes it searches for anything but '(' and then has a positive lookahead for 'feat.' and unless it finds them then its doesn't match and therefore replace unwanted files. PS. The filter is handy when you have say 10,000 files and running actions on unwanted files is a waste EDIT: (screen-shot of how the regexp works) This post has been edited by stevehero: Jul 6 2012, 15:21 -------------------- I ♥ singing Dubstep ♪♫WOOB WOOB WOOB WOOB UBB OHMOMOMO DROP WOOOOOOB WOOB WOOB WOOB WUB WUB WUB WUB WUB WUB WUB WUB MOMOMO WOOB WOOB♫♪
|
|
|
|
||
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 05:13 |