Request: script to delete characters in Tag


#1

Hi,
This would be really helpful since I import a lot of
Titles from tag lists and I can't find a simple way to remove
charactars usually at the end of title.
Like:

Calypso Frelimo (Miles Davis) 21:40
What I Say (Miles Davis) 13.49

I want to delete the last five characters after %title% (%composer%),
either through an Action or using a string when importing a tag list...
Sometimes its timings but sometimes something else, just to be able
to do it would be good.

I have looked around for it on the Forum but I can't see it.

All best
----Hank


#2

Is it always five characters? If yes, you could use something like $mid(%title%,1,$sub($len(%title%),6)) in a Format values action type.


#3

Thanks Sebastian,
This worked just great!
It's not always five characters...what do i change if so?

Thanks
---Hank


#4

Well, it depends exactly on what the string looks like. You could change the "6" from my example to "7" if the string has six characters or to "4" if you only want to remove the last three characters (always the number of characters you want to remove + 1 for the space).
However, if the string always contains two or three numbers followed by a colon and then two numbers, you can use RegExp actions.