IPB

Welcome Guest ( Log In | Register )

> Notice!

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.

 
Reply to this topicStart new topic
> Need help with reg expression
350zfan
post Sep 28 2010, 16:33
Post #1


Member


Group: Members
Posts: 1
Joined: 28-September 10
Member No.: 12995
Mp3tag Version: 2.46a



Hey Guys,

I looked through the RegEx thread and tried to figure our how to do this but I can't get it o work for the life of me.

I have about 3000 thousand songs that are named incorrectly in the filename but the but the TITLE in the TAG is correct, the only problem is that the tag has a bunch of useless information all different for all songs in the TITLE and I want to correct it.

Example:
TITLE= "Sexy B***h [Album Version]/(Feat. Akon)/Album Version"

Now I can't just rename the filename based on the tag because of the "/", doing so would make the filename "Sexy B***h [Album Version]" and I want the "(Feat. AKon)" in this case. So in this case I have gone and replaced all the "/" with "-----" so now I have "Sexy B***h [Album Version]-----(Feat. Akon)-----Album Version". Now 3000 songs have "----- blah blah blah" at the end. and I want to remove that. I don't mind the manual work for the songs that have "Feat." in them but all my songs have the junk at the end.

What what I use to remove the "-----" and everything after it?

Thanks a million
Go to the top of the page
 
+Quote Post
ohrenkino
post Sep 29 2010, 06:10
Post #2


Member


Group: Full Members
Posts: 3151
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.55a



ZITAT(350zfan @ Sep 28 2010, 17:33) *
"so now I have "Sexy B***h [Album Version]-----(Feat. Akon)-----Album Version".
have "----- blah blah blah" at the end.

What what I use to remove the "-----" and everything after it?

Thanks a million

I am not quite sure where the "----- blah blah blah" starts for you - there are 2 occurrences.
Anyway: what you do is either use the tag - Filename converter or an action to format the tag field "%_filenme%.
Enter

$left(%title%,$strstr(%title%,"----")-1)
This uses all the characters in %title%, starting at the left-most character in %title% until it reaches the pattern "----" for the first time.

BTW: using the tag-filename converter may be a little more convenient as you can easily add other fields as well e.g. %track%.


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st May 2013 - 07:24