# Deleting or Removing Characters at the End of a String

**URL:** https://community.mp3tag.de/t/deleting-or-removing-characters-at-the-end-of-a-string/9717
**Category:** General Discussion
**Created:** [January 17, 2010, 7:08am UTC](https://community.mp3tag.de/t/deleting-or-removing-characters-at-the-end-of-a-string/9717 "2010-01-17T07:08:43Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![lobojon](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@lobojon](https://community.mp3tag.de/u/lobojon)
#### Post date: [January 17, 2010, 7:08am UTC](https://community.mp3tag.de/t/deleting-or-removing-characters-at-the-end-of-a-string/9717/1 "2010-01-17T07:08:43Z")

</div>

Hello everyone,

I read through the FAQ and ran several searches in the forum (4 hours of my failure to locate an answer) in an attempt to delete some characters from the end of my title field. As I understand it, the process should work on any field. Anywhoooo

I found in the FAQ deleting leading characters where ^.{4} deleted the first 4 letters from the left. That was great and simple. My next question would be how to include deleting numbers and characters from the left. Since that was so easy, I figured the same issue for trailing characters would be easy to tackle.

So, I tried to understand some principles and arrived at the expression [4\w]$ which only removes one letter or number at a time at the end of my title and does not remove a "."

My problem is that I have a title with ".mp3" included as part of the title. No, it is not the file extension. The entire title therefore looks like this: song of the south.MP3.mp3

I want to remove the last 4 characters in the song title. In this case, the 4 characters happen to be ".mp3". I figured that I could then use the same expression and just change the number if I run into any other weirdness.

If you know where the existing post is that answers this question, please indicate.  
If you can solve this problem, that would be great.  
If you think there is a better way to solve this particular issue, please school me.

Thank you very much for your consideration.

---

_[View the full topic](https://community.mp3tag.de/t/deleting-or-removing-characters-at-the-end-of-a-string/9717)._
