Title field format

Hi all,

I'm new to the board and to mp3tag and a complete illiterate when it comes to Regular Expressions so I can't figure this one out...even if it bit me

A lot of my files have this format:
track - artist - title - mix.mp3
or
artist - title - mix.mp3

I'm trying to make them look like this:
track - artist - title (mix).mp3

so, basically, I would like to replace the Title field that looks like this:
title - mix
and make it look like this:
title (mix)

This is extremely basic and yet, I can't figure it out.
Help Please?

Thanks for your help

Seems you only want to work with the TITLE field so use this:

This will only work if the title contains one -
Format action
FIELD: TITLE
FORMAT STR: $if($eql($regexp(%title%,'[^-]+',,),-),$regexp(%title%,(.+?)\s+-\s+(.+),$1 ($2)),%title%)

Which will result in (leaving more than one - chars in the TITLE field untouched):

Title - Mix
->
Title (Mix)

Title - Other Stuff - Mix
->
Title - Other Stuff - Mix

Or you could do this either:
FIELD: TITLE
FORMAT STR: $regexp(%title%,(.+)\s+-\s+(.+),$1 ($2))

Which will result in (using from the last - char):

Title - Mix
->
Title (Mix)

Title - Other Stuff - Mix
->
Title - Other Stuff (Mix)

EDIT: to fix leaving more than two > leaving more than one

Very appreciated,

Works perfectly well,

Thank you