Delete a tag if last character is a dot

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

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.

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

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

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