# removing random string of character at the end of title

**URL:** <https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978>\
**Category:** Support\
**Created:** [May 11, 2017, 5:36pm UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978 "2017-05-11T17:36:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![asd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@asd](https://community.mp3tag.de/u/asd)\
**Post date:** [May 11, 2017, 5:36pm UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978/1 "2017-05-11T17:36:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [May 11, 2017, 6:23pm UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978/2 "2017-05-11T18:23:52Z")

</div>

> [@asd](#):
>
> ... 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.

---

<div class="post-metadata">

**Author:** ![asd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@asd](https://community.mp3tag.de/u/asd)\
**Post date:** [May 12, 2017, 2:31am UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978/3 "2017-05-12T02:31:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [May 12, 2017, 3:38am UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978/4 "2017-05-12T03:38:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [May 12, 2017, 10:06am UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978/5 "2017-05-12T10:06:17Z")

</div>

> [@asd](#):
>
> The random string changes in length and is only separated from the rest of the title by a space ... the format of the names is "trackname xyZxacNg" ... to remove the last word ...

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

DD.20170512.1406.CEST

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:26pm UTC](https://community.mp3tag.de/t/removing-random-string-of-character-at-the-end-of-title/18978/6 "2026-02-09T12:26:49Z")

</div>


