Moving text inside [ ]


#1

I cannot appear to get this to work, ive tried adapting the other regex expressions I have found on here and a very similar one which uses () but I cannot get it to work with [].

Heres what I am trying to achieve:

TITLE - Song name [Tune of the Week]

I would like to move the text in the [] out of the TITLE tag and move to a new tag called FEATURE. The [] and the text in the TITLE would then be removed.

I have tried using a very similar Guess Values action which I use to remove (Disc #) from MusicBrainz album tags and populate the DISCNUMBER tag but this doesnt work:

Source format: %feature%$regexp(%title%,(.) [(.)],$2+++$1)
Guessing pattern: %feature%+++%title%


#2
Begin Action Group Test 2011#20110131.djphatic.Guess

Action #1
Actiontype 7: Import tag fields (guess values)
Source format: %TITLE%
Guessing pattern: %TITLE%÷[%FEATURE%]

Note: Replace each special ÷ character with one space character.
End Action Group Test 2011#20110131.djphatic.Guess (1 Action)

DD.20110131.2034.CET

???

Action #2
Actiontype 9: Remove fields
Fields to remove (semicolon separated): TITLE

DD.20110131.2046.CET


#3

Hi

This doesnt work for me.

With regards to removing the text from the TITLE tag I mean:

TITLE - Song name [Tune of the Week]

to

TITLE - Song name
FEATURE - Tune of the Week


#4

After you have "guessed" the value and title still has the square brackets you could add an action that (with just an ordinary "replace") replaces the square brackets with nothing.
If you are sure that always the same remainder can be found you may do this with one action like
Replace
Search string "[ ]" (leave out the quotation marks)
Replace string "" (leave out the quotation marks = nothing)

Or replace one bracket after the other and then also add an action for title to trim the trailing spaces:
Format tag field Title
String: $trim(%title%)


#5

Should work, it is one of the simplest things you can do in Mp3tag, see FAQ area and thousands of user requests in the forum of nearly the same problem.
Try again Action #1 as described!

DD.20110201.1144.CET



#6

Managed to get it to work, the problem was I had used TITLE in the Source format rather than %title%.


#7

Yes, there is a learning curve how to differentiate between the tag-field name and the tag-field content.

If you want to use the content of a tag-field, then you have to enclose the tag-field name by a pair of percent signs, which work as "content operators".

DD.20110201.2110.CET


#8

A quick variation of this that I couldn't figure out. I have tracks with the title field being:
Song Title [Feat. Second Artist]

After Mp3Tag made a big deal about ALBUMARTIST vs. ARTIST and all that jazz, and keeping the TITLE clean, I figure I want to move the [Feat. Second Artist] part to the end of the ARTIST, so I want to start with:
ARTIST = First Artist
TITLE = Song Title [Feat. Second Artist]

and go to:
ALBUMARTIST = First Artist
ARTIST = First Artist [Feat. Second Artist]
TITLE = Song Title

Thoughts on how to make that happen in one step?
Thanks!


#9

What is more important for you?

  • "... to make that happen in one step"?
  • "... to make that happen?

Be aware, that a complicated looking task can mostly be solved by single steps.
Mp3tag supports this strategy by so called action modules, so that nobody needs to solve their tasks in a one step go.

You can find answers and examples for your problem in this thread and in the FAQ area of the forum.

DD.20110213.0840.CET


#10

It would be nice if I could run a single action (even if it had nested subactions in there) so that I could process a whole bunch of files at once.
Any hints on the single steps? I'm not an expert at regexp and my Mp3Tag actions so far have been pretty simple.


#11

As I said ... you can find simple answers and simple strategies in the FAQ area for such basic questions and overall in the forum threads too.

At last you can build an actiongroup which would look like this ...

Begin Action Group Test 2011#20110213.thelordsmurf.guess

Action #1
Actiontype 5: Format value
Field: ALBUMARTIST
Formatstring: %ARTIST%

Action #2
Actiontype 7: Import tag fields (guess values)
Source format: %TITLE%
Guessing pattern: %DUMMY%÷[%TITLE2%]

Action #3
Actiontype 7: Import tag fields (guess values)
Source format: %TITLE%
Guessing pattern: %TITLE%÷[%DUMMY%]

Action #4
Actiontype 5: Format value
Field: ARTIST
Formatstring: %ARTIST%÷'['%TITLE2%']'

Action #5
Actiontype 9: Remove fields
Fields to remove (semicolon separated): TITLE2

Note: Replace each special ÷ character with one space character.
End Action Group Test 2011#20110213.thelordsmurf.guess (5 Actions)

DD.20110213.1000.CET