# Removing last title character when it is a comma (,)

**URL:** https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355
**Category:** Support
**Created:** [August 1, 2011, 9:12am UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355 "2011-08-01T09:12:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kimosapiens](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@kimosapiens](https://community.mp3tag.de/u/kimosapiens)
#### Post date: [August 1, 2011, 9:12am UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/1 "2011-08-01T09:12:51Z")

</div>

I need to remove a comma at the end of the title: My Song,

Please help !

---

<div class="post-metadata">

### Author: ![mjcm](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mjcm](https://community.mp3tag.de/u/mjcm)
#### Post date: [August 1, 2011, 9:17am UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/2 "2011-08-01T09:17:09Z")

</div>

2 Posts but only 1 answer 😉

[Actions](https://community.mp3tag.de/t/967/4)

But this option, will remove all the comma's in the Title, No doubt that another member will come up with a fancier solution 😉

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [August 1, 2011, 9:22am UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/3 "2011-08-01T09:22:03Z")

</div>

> [@Mike\_nl](#):
>
> 2 Posts but only 1 answer 😉
> 
> [Actions](https://community.mp3tag.de/t/967/4)
> 
> But this option, will remove all the comma's in the Title, No doubt that another member will come up with a fancier solution 😉

fancier solution :  
Action: Format Value  
Field: TITLE  
Formatstring: $regexp(%title%,',$',)

removes the last character if it is a comma

---

<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: [August 1, 2011, 11:57am UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/4 "2011-08-01T11:57:16Z")

</div>

> [@Kimosavi](#):
>
> I need to remove a comma at the end of the title:  
> My Song,  
> ...

This removes all trailing commas.  
Action: Format value  
Field: TITLE  
Formatstring: **$trimRight(%TITLE%,',')**

This removes only one trailing comma, if the last character is a comma.  
Action: Format value  
Field: TITLE

**$if($eql($right(%TITLE%,1),','),$cutRight(%TITLE%,1),%TITLE%)**

See also:  
[Removing " , " at end of Artist field](https://community.mp3tag.de/t/10184/1)

DD.20110801.1626.CEST

---

<div class="post-metadata">

### Author: ![kimosapiens](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/eb9ed0/32.png) [@kimosapiens](https://community.mp3tag.de/u/kimosapiens)
#### Post date: [August 4, 2011, 6:41pm UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/5 "2011-08-04T18:41:56Z")

</div>

> [@pone](#):
>
> fancier solution :  
> Action: Format Value  
> Field: TITLE  
> Formatstring: $regexp(%title%,',$',)
> 
> removes the last character if it is a comma

Thanks for helping, but doesn't work. Comma is not removed at the end of the title (no spaces).  
I tried the command using copy & paste, so there is no error while copying...

Ie: Song Title,

---

<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: [August 5, 2011, 1:38am UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/6 "2011-08-05T01:38:39Z")

</div>

> [@Kimosavi](#):
>
> Thanks for helping, but doesn't work. Comma is not removed at the end of the title (no spaces). I tried the command using copy & paste, so there is no error while copying... Ie: Song Title,

pone's proposal works for me ...

> [@pone](#):
>
> fancier solution :  
> Action: Format Value  
> Field: TITLE  
> Formatstring: $regexp(%title%,',$',)  
> removes the last character if it is a comma

... as good as my proposals.

'Kimosavi', you are struggling on removing a comma since your first post on this theme at Mar 26 2010, 10:01. You have gotten a big bag of help and working examples what users of Mp3tag can think of.  
Please talk back what method does work for you.

In your last post from Aug 4 2011, 22:41 you gave the example string ...  
**_Ie: Song Title,_**   
... so what tagfield is really involved?  
**TITLE**  
or  
**\_FILENAME**  
or  
what else?

DD.20110805.0540.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:23pm UTC](https://community.mp3tag.de/t/removing-last-title-character-when-it-is-a-comma/12355/7 "2026-02-09T12:23:15Z")

</div>


