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
> Title field format
Tradingdj
post Sep 10 2017, 23:42
Post #1


Member


Group: Members
Posts: 2
Joined: 10-September 17
Member No.: 23898
Mp3tag Version: 2.77



Hi all,

I'm new to the board and to mp3tag and a complete illiterate when it comes to Regular Expressions so I can't figure this one out...even if it bit me

A lot of my files have this format:
track - artist - title - mix.mp3
or
artist - title - mix.mp3

I'm trying to make them look like this:
track - artist - title (mix).mp3

so, basically, I would like to replace the Title field that looks like this:
title - mix
and make it look like this:
title (mix)

This is extremely basic and yet, I can't figure it out.
Help Please?

Thanks for your help
Go to the top of the page
 
+Quote Post
stevehero
post Sep 11 2017, 00:22
Post #2


Member


Group: Full Members
Posts: 824
Joined: 3-December 10
From: Ireland
Member No.: 13334
Mp3tag Version: 2.84



QUOTE
so, basically, I would like to replace the Title field that looks like this:
title - mix
and make it look like this:
title (mix)

Seems you only want to work with the TITLE field so use this:

This will only work if the title contains one -
Format action
FIELD: TITLE
FORMAT STR: $if($eql($regexp(%title%,'[^-]+',,),-),$regexp(%title%,(.+?)\s+-\s+(.+),$1 ($2)),%title%)

Which will result in (leaving more than one - chars in the TITLE field untouched):
CODE
Title - Mix
->
Title (Mix)


CODE
Title - Other Stuff - Mix
->
Title - Other Stuff - Mix



Or you could do this either:
FIELD: TITLE
FORMAT STR: $regexp(%title%,(.+)\s+-\s+(.+),$1 ($2))

Which will result in (using from the last - char):
CODE
Title - Mix
->
Title (Mix)


CODE
Title - Other Stuff - Mix
->
Title - Other Stuff (Mix)


EDIT: to fix leaving more than two > leaving more than one

This post has been edited by stevehero: Sep 11 2017, 01:44


--------------------
Go to the top of the page
 
+Quote Post
Tradingdj
post Sep 11 2017, 01:19
Post #3


Member


Group: Members
Posts: 2
Joined: 10-September 17
Member No.: 23898
Mp3tag Version: 2.77



Very appreciated,

Works perfectly well,

Thank you
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: 19th September 2017 - 16:09