# Delete a tag if last character is a dot

**URL:** <https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536>\
**Category:** Support\
**Created:** [January 23, 2015, 1:22am UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536 "2015-01-23T01:22:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quisquose](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/q/ea666f/32.png) [@Quisquose](https://community.mp3tag.de/u/Quisquose)\
**Post date:** [January 23, 2015, 1:22am UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/1 "2015-01-23T01:22:43Z")

</div>

I would like to know what script command to use to delete a tag if the tag's value ends with a dot (i.e. "." is the last character in the string)

Thanks

---

<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 23, 2015, 2:56am UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/2 "2015-01-23T02:56:11Z")

</div>

> [@Quiquose](#):
>
> I would like to know what script command to use to delete a tag if the tag's value ends with a dot (i.e. "." is the last character in the string) Thanks

**TEST \<== $if($neql($regexp(%TEST%,'\.$',),%TEST%),,%TEST%)** 

... or ...

 TEST \<== $if($eql($right(%TEST%,1),'.'),,%TEST%)

DD.20150123.0456.CET

---

<div class="post-metadata">

**Author:** ![Quisquose](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/q/ea666f/32.png) [@Quisquose](https://community.mp3tag.de/u/Quisquose)\
**Post date:** [January 23, 2015, 2:47pm UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/3 "2015-01-23T14:47:11Z")

</div>

Thanks! It works great.

I'm starting to get a little bit familiar with the commands, and they're making more sense to me now.

---

<div class="post-metadata">

**Author:** ![Quisquose](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/q/ea666f/32.png) [@Quisquose](https://community.mp3tag.de/u/Quisquose)\
**Post date:** [January 23, 2015, 3:16pm UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/4 "2015-01-23T15:16:12Z")

</div>

Just one other question: how would you strip only the trailing dots from a value i.e. strip only the right most dots (that are not separated by any other character) and only remove those ones, not dots anywhere else in the string.

Examples:

1. = 123  
878.478 = 878.478 (i.e. no change)  
ashd.sjdu... = ashd.sjdu  
7463.283.2. = 7463.283.2  
...xgd....sks.... = ...xgd....sks

---

<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 23, 2015, 5:55pm UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/5 "2015-01-23T17:55:13Z")

</div>

Replace with regular expression  
Search: .$  
Replace:  
(leave empty)

---

<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 23, 2015, 7:00pm UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/6 "2015-01-23T19:00:06Z")

</div>

> [@Quiquose](#):
>
> Just one other question: how would you strip only the trailing dots from a value i.e. strip only the right most dots (that are not separated by any other character) and only remove those ones, not dots anywhere else in the string. ...

There is a page in the Mp3tag manual with a list of all scripting functions with a short description.  
The function $trimRight() is simple and efficient, it removes characters at the right side of the given string.

**$trimRight(%TEST%)removes space characters $trimRight(%TEST%,'.')removes dot characters $trimRight(%TEST%,'. ')removes dot or space characters $trimRight(%TEST%,'. -')removes dot or space or hyphen minus characters ... or ... $regexp(%TEST%,'\.+$',)removes one or more dots at the right end $regexp(%TEST%,'[. -]+$',)removes dot or space or hyphen minus characters at the right end**

DD.20150123.2120.CET

---

<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:25pm UTC](https://community.mp3tag.de/t/delete-a-tag-if-last-character-is-a-dot/16536/7 "2026-02-09T12:25:29Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


