I've run into a situation a few times where I have a group of similar tokens that are all numbered (using TokenNameNumber ), but then I decide that I want to change all of the names in the same way without losing the numbers. Currently I've been just doing this manually and individually with a TokenMod command. For example, if I've prepared a map with a group of Cultists, and then I realize that I don't actually want to name them all 'Cultist 1, Cultist 2, ...' because my players don't realize they are part of the cult yet, it would be really handy to be able to change just the 'Cultist' part in bulk on all the tokens. Or other times I simply want to shorten a long name such 'Heavily Armored Statuette 1' to just be 'Statue 1'. I'm trying to adapt this awesome script to just affect the token names, but I'm stuck on the syntax for isolating the current token name and swapping out only a specific portion. Any help would be appreciated!