Caputuring BPM from end of title

So apologies I have searched for this, but whilst there are a number of similar posts, none are quite the same.

So I have lots of files that are. Artist - Title BPM

So examples
Goya Menór & Nektunez - Ameno Ampiano (You Wanna Bamba) (Remix - Mm Clean Edit) 113.mp3
Shabba Ranks With Chevelle Franklin - Mr. Loverman (Album Version) 86.mp3
Shaggy - Oh Carolina 125.mp3

This is quite common with songs purchased from DJ sources as it tells me what bpm the track was re-mastered in.

So I can grab the bpm from the title and populate it, and then re-title the songs. (actually scratch that I can't as I have the same problem it's not working

However, I'd really appreciate help understanding how to do this with regex.

So I need to capture only the last Space then [0-9 ]+`

But how do I make sure I don't grab anthing from the beginning in case the artist is something like heaven 17 ?

Many thanks.

Try an action of the type "Format value" for BPM
Format string: $regexp(%_filename%,.*?(\d+)$,$1)

That works perfectly, many thanks.

Is there any way to then use that to remove it from the title or from the file name?

As I still end up with Champion 90 as the Title of the song, even though I've now got the BPM (and I re-reading my post, I apologise that this removal wasn't clearer)

Again many thanks for the assistance.

The title isn't the filename.
As MP3tag is a tagging program I would always manipulate the tag fields and finally, if at all, generate a filename with the tag data. Filenames have certain restrictions in respect to valid characters but these restrictions do not apply to the tag fields.

Coming back to the problem:
To remove the trailing number after you have filled BPM:
Try an action of the type "Replace with regular expression" for TITLE
Search string: (.*?) \d+$
Replace with: $1

Aware the title isn't the file name, but was looking at it this way.

If I can remove from the filename, I can use format filename - tags.

If I can remove from the title, I can use tags - filename.

I will give your second action a go, many thanks.

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