Purpose
Remove trailing characters

Please keep in mind that this is not necessary for space characters, since they are truncated automatically when you use a GuiXT variable unless you have specified
ProcessingOption trailingSpace= "On"

Solution

GuiXT
// sample value
Set V[city] "@@@@@München@@@"
	
// remove trailing @ 
Set V[city2] "&V[city]" regex="\@*$" regexReplaceFirst="" 
	
// test message
Message "&V[city]\n&V[city2]"

Components
InputAssistant