removing random string of character at the end of title


I have been using MP3TAG while digitizing my music and it has been a huge help. The only problem I have come across is some files have a random string of letters and numbers at the end of the file and I can't figure out how to batch replace them. Is there an action that can do this or am I stuck editing manually for this particular problem?


I don't know as you do not tell us anything about the possiblities to identify this random string:
does it have a certain length? Then you can cut so and so many characters from the end.
Does it have a certain character that separates it from the useful information like e.g. an underscore?
So perhaps some concrete examples might help.


The random string changes in length and is only separated from the rest of the title by a space but there are spaces needed in most titles.

the format of the names is "trackname xyZxacNg" "track name t7xgRY"

The only constant for the string is it has no spaces in itself and it is always at the end. The ability to remove the last word was all I could think of but I had no idea how to do that or if it was possible.

I will look up how to cut X characters from the end because that will cut way down on how many tracks I have to rename manually but it wont fix all of them. Thanks for your help.


You could try an action of the type "Replace with regular expression" for TITLE
Search string: (.*) \w$
Replace string: $1

This assumes that the random string is a (one) word at the end.


TITLE <== $regexp(%TITLE%,'(?#remove trailing word)^(.+?)\s+\S*$','$1')