# Request: script to delete characters in Tag

**URL:** https://community.mp3tag.de/t/request-script-to-delete-characters-in-tag/3135
**Category:** General Discussion
**Created:** [April 3, 2006, 6:38am UTC](https://community.mp3tag.de/t/request-script-to-delete-characters-in-tag/3135 "2006-04-03T06:38:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![HankD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/hankd/32/5130_2.png) [@HankD](https://community.mp3tag.de/u/HankD)
#### Post date: [April 3, 2006, 6:38am UTC](https://community.mp3tag.de/t/request-script-to-delete-characters-in-tag/3135/1 "2006-04-03T06:38:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [April 3, 2006, 6:58am UTC](https://community.mp3tag.de/t/request-script-to-delete-characters-in-tag/3135/2 "2006-04-03T06:58:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![HankD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/hankd/32/5130_2.png) [@HankD](https://community.mp3tag.de/u/HankD)
#### Post date: [April 3, 2006, 11:08am UTC](https://community.mp3tag.de/t/request-script-to-delete-characters-in-tag/3135/3 "2006-04-03T11:08:50Z")

</div>

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

Thanks  
---Hank

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [April 3, 2006, 11:55am UTC](https://community.mp3tag.de/t/request-script-to-delete-characters-in-tag/3135/4 "2006-04-03T11:55:23Z")

</div>

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.
