Remove Key and BPM from end of Title

My title reads "I Go To Work [DJ Johnny Flores Edit] 4A 126". I would like to remove the "4A 126" (Key and BPM). I realize I could remove last 6 spaces from the end, but some of my files may be only 5 spaces. Also, how would I filter my files for this? Thanks In Advance.

Can you clarify if ALL of your titles have items in square brackets like [DJ Johnny Flores Edit]? And ALL titles do have a key and BPM on the end?

All my files do not have the brackets or the Key and Bpm in the title.

All of the Key and BPM is at the end of the title, but the key and bpm is not in every title.

You could try:
$regexp(%title%,(.*)\d. \d+,$1)

In the converter>Tag-Tag or an action of the type "Format value" for TITLE

Perfect! How would I filter these files?

Actually, It will only delete these values if they exist correct?

yes. only if there is a hit - otherwise the complete data from the field is the result.

Yet, if you want to filter, then applying the action only to filtered files will reduce the amount of files with a modified date - MP3tag opens and closes all files even though nothing may be changed.

%title% MATCHES ".*\d. \d+"

1 Like

Wow. I'm about a week new to this, but ive learned so much in the last week. Thanks!

Ok, I had some files with "10A 126" vs "4A 126". So now I have files with a trailing "1". I have searched to find a way to filter these with no luck.

once filtered I would use

Field: Title
Regular expression: ^.{2}$ to remove 2 charachters chars.
Replace matches with:

Try this filter:
%title% MATCHES "1$"

Perfect again! Thanks

Ok you have been a great help. I have "title - 120", "title - 90", "title 90", "title -7A - 120". How can I filter these and then remove everything but the title?

Looks like you alsways have a number at the end.
The filter would be:
%title% MATCHES "\d+$"

The title looks like everything following the hyphen should be deleted:
$regexp(%title%,'(.*?) -.*',$1)

1 Like

What if I have a space between title and number? Remove the Dash?

You can test the regular expression in Converter>Tag-Tag.
See, if it produces the correct result.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.