Remove last 7 characters from ALBUM tag

I am long time user but not at all an 'under the hood' tinkler, all I have needed to do with MP3tag so far I have mangaed.. however...
I have many hundreds of files that have an ALBUM tag of > for example "DIVE [1993]" this date is NOT from the DATE tag, it is part of the ALBUM tag, unfortunately.
So Q. how to use Actions or Convert to remove the last 7 characters of the ALBUM tag/field..?

Cheers to you all out there helping out us users with less technically minded.. and special Florian for keeping updating..

As an action (quick or in an action group)

Action type: Format value
Field: ALBUM
Format String: $cutright(%album%,7)

or with the converter Tag->Tag with a preview:

Field: ALBUM
Format String: $cutright(%album%,7)

Even though the $cutright() function is a completely valid way to get rid of the trailing 7 characters, I am a little reluctant to use this (IMHO) brute force approach as it cuts away the last 7 characters even if they are not a number in brackets.

So, as an alternative, to remove a number in square brackets, I sugget:
$regexp('DIVE [1993]',' \[\d+\]',)


Thanks to ohrenkino and poster.. not only a quick responce but two ways of doing it.. shows how good this software really is..
I had tried to do it with an action as shown in posters reply.. but i must have had a slight error somewhere.. anyway it will work now I have a confirm that at least I was heading in the right direction..
cheers to all again CD

If you want to learn a 3rd way:
Use an action of the type "Guess value"
Source. %album%
Target: %album% [%dummy%

1 Like