# Removing " , " at end of Artist field

**URL:** https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184
**Category:** General Discussion
**Created:** [March 26, 2010, 7:01am UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184 "2010-03-26T07:01:52Z")
**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: [March 26, 2010, 7:01am UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/1 "2010-03-26T07:01:52Z")

</div>

Hi !

I need to remove the character " , " when it is present at the end of Artist Name field.

How do I remove it ?

---

<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: [March 26, 2010, 9:08am UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/2 "2010-03-26T09:08:26Z")

</div>

> [@Kimosavi](#):
>
> ... I need to remove the character " , " when it is present at the end of Artist Name field. How do I remove it ?

Your example character string is three characters long "space comma space".

So my first thought was ...  
$trim(%ARTIST%,' ,')  
... which removes space and comma from both sides of the given string.

Second thought was using a regular expression ...  
$regexp(%ARTIST%,'\s\*,\s\*$',)  
... which removes space and comma from the end of the string, if existing.

There might be other Mp3tag scripting solutions.

DD.20100326.1108.CET

---

<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: [March 31, 2010, 5:24pm UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/3 "2010-03-31T17:24:56Z")

</div>

Still having problems.... ![:unsure:](https://community.mp3tag.de/uploads/default/original/1X/cfaeba84fe6704387c5b34dfdd8172bd51b6f533.gif ":unsure:")

---

<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: [March 31, 2010, 5:39pm UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/4 "2010-03-31T17:39:35Z")

</div>

> [@DetlevD](#):
>
> Your example character string is three characters long "space comma space".
> 
> So my first thought was ...  
> $trim(%ARTIST%,' ,')  
> ... which removes space and comma from both sides of the given string.
> 
> Second thought was using a regular expression ...  
> $regexp(%ARTIST%,'\s\*,\s\*$',)  
> ... which removes space and comma from the end of the string, if existing.
> 
> There might be other Mp3tag scripting solutions.
> 
> DD.20100326.1108.CET

================================================================

PLEASE ! tell me where I put those commands. ie., (replace, regular expression, guess value....)

What I want is to remove the "," if it appears after the Artist Name:

from ARTIST: Madonna,  
to ARTIST: Madonna

---

<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: [April 1, 2010, 1:48am UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/5 "2010-04-01T01:48:45Z")

</div>

> [@Kimosavi](#):
>
> ... What I want is to remove the "," if it appears after the Artist Name:  
> from ARTIST: Madonna,
> 
> ```
> to ARTIST: Madonna
> 
> ```

Yes, you can use an action "Guess values" too! Thanks for the hint.  
Action "Guess values"  
Source format: **%ARTIST%**  
Guessing pattern: **%ARTIST%,**

DD.20100401.0548.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: [April 1, 2010, 2:35am UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/6 "2010-04-01T02:35:12Z")

</div>

> [@DetlevD](#):
>
> Yes, you can use an action "Guess values" too! Thanks for the hint.  
> Action "Guess values"  
> Source format: **%ARTIST%**  
> Guessing pattern: **%ARTIST%,**
> 
> DD.20100401.0548.CEST

Thanks again !!! You are the very best member here....

---

<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: [April 2, 2010, 9:15am UTC](https://community.mp3tag.de/t/removing-at-end-of-artist-field/10184/7 "2010-04-02T09:15:20Z")

</div>

> [@Kimosavi](#):
>
> Thanks again !!! You are the very best member here....

![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:") Hehe, Kimosavi, so much praise, maybe one of few, I do not know if I really deserve it.

DD.20100402.1314.CEST

See also:  
[Removing last title character when it is a comma (,)](https://community.mp3tag.de/t/12355/1)

DD.20110801.1630.CEST
