# Remove last character if =\*

**URL:** https://community.mp3tag.de/t/remove-last-character-if/9657
**Category:** Support
**Created:** [January 7, 2010, 3:24am UTC](https://community.mp3tag.de/t/remove-last-character-if/9657 "2010-01-07T03:24:48Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![thorsonb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@thorsonb](https://community.mp3tag.de/u/thorsonb)
#### Post date: [January 7, 2010, 3:24am UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/1 "2010-01-07T03:24:48Z")

</div>

How can I get my MP3Tag to strip the last charter from certain fields (Artist, Title, and Album)

I realize some of my songs the title always ends with a "space" / " " (space bar space)

How can i get MP3Tag to:

- read the field
- check if the last character is a space
- if the last character is a space
- then remove last character from field

.... Since this might be a usefull thing also how can i do the exact same thing.. but if first charachter in the field is a space, then remove the first character.

Thanks in advance  
Happy New Years to one and all!

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [January 7, 2010, 9:50am UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/2 "2010-01-07T09:50:02Z")

</div>

Same answer as here  
[/t/9261/1](https://community.mp3tag.de/t/9261/1)

---

<div class="post-metadata">

### Author: ![Tarc](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/9fc348/32.png) [@Tarc](https://community.mp3tag.de/u/Tarc)
#### Post date: [January 7, 2010, 2:00pm UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/3 "2010-01-07T14:00:17Z")

</div>

Check dano's video at the end of the topic he linked - there is your answer.

---

<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: [January 7, 2010, 2:58pm UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/4 "2010-01-07T14:58:02Z")

</div>

> [@ThorsonB](#):
>
> ... I realize some of my songs the title always ends with a "space" / " " (space bar space) ...

Although you've got great help for this question already, here is another proposal, e. g.

```
$trim(%ARTIST%,' /')

```

DD.20100107.1657.CET

---

<div class="post-metadata">

### Author: ![Tarc](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/9fc348/32.png) [@Tarc](https://community.mp3tag.de/u/Tarc)
#### Post date: [January 7, 2010, 3:02pm UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/5 "2010-01-07T15:02:46Z")

</div>

> [@DetlevD](#):
>
> Although you've got great help for this question already, here is another proposal, e. g.
> 
> ```
> $trim(%ARTIST%,' /')
> 
> ```
> 
> DD.20100107.1657.CET

Wow. Just wow.

---

<div class="post-metadata">

### Author: ![thorsonb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@thorsonb](https://community.mp3tag.de/u/thorsonb)
#### Post date: [January 8, 2010, 10:41pm UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/6 "2010-01-08T22:41:10Z")

</div>

**Arggg!!! I forgot i asked this question already!**

Hardly been active on this forum.. Sorry guys!!1!

---

<div class="post-metadata">

### Author: ![Tarc](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/9fc348/32.png) [@Tarc](https://community.mp3tag.de/u/Tarc)
#### Post date: [January 8, 2010, 10:43pm UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/7 "2010-01-08T22:43:02Z")

</div>

But.. you still can't figure it out? I mean your previous topic was made a few months ago. I saw that you got answers there, too already, like instantly.

---

<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: [January 31, 2024, 6:07am UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/8 "2024-01-31T06:07:49Z")

</div>

2 posts were split to a new topic: [Remove trailing apostrophe](https://community.mp3tag.de/t/remove-trailing-apostrophe/63625)

---

<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: [March 8, 2025, 2:51pm UTC](https://community.mp3tag.de/t/remove-last-character-if/9657/9 "2025-03-08T14:51:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
