Title has all the details

Got an interesting one.

Was helping a friend with mp3tag and all was well.

Until I get a call that starts with oops.

They’ve managed to somehow put most of the meta date into the title field…twice.

So it looks like this.

Ottawan - D.I.S.C.O. ( Dj Vivid 2025 remix ) 123 bpm - Ottawan - D.I.S.C.O. ( Dj Vivid Santana 2025 remix ) 123 bpm

Now I’ve been playing around with tag - tag

and I thought

%artist% - %title% -%mixartist% %bpm% - %dummy%

Should work, but it doesn’t it just puts the big title in the other fields.

Any help would be much appreciated and happy new year !

If the duplicated part of all titles ends with bpm, your friend can use an action Replace with Regular Expression for field TITLE with

Regular Expression: ^(.*? bpm).*
Replace matches with: $1


What took me a while to realise is that the two parts in your example are no exact duplicates. The first instance has Dj Vivid 2025 remix and the second instance has Dj Vivid Santana 2025 remix.

If both parts would be exact duplicates, you could use a back-reference like
^(.+?)(?:\s*-\s*\1)$
and replace this with $1

Happy new year to you too!

That's because your guessing pattern does not exactly match the real values:
There is no space and minus character in front of %mixartist%, but parentheses around it.
And the field BPM should only contain a number, not 123 bpm

If you were to use a guessing pattern like this:
%artist% - %title% ( %mixartist% ) %bpm% bpm - %dummy%
it could work.

As @Florian already wrote above, this only works, if the TITLEs of your friends tracks always contain the "nnn bpm -" part before the second "duplicated" part starts.