Thanks for all the detailed help, @Nige_S. I've been approaching the sorting problem in a different thread (How to sort a list by first non-modifier character?) and @ComplexPoint came up with the Shell commands to do that — IF I first insert delimiters around the modifier symbols so that the input line can be broken into distinct fields. It's some pretty basic Regex editing to do that and then remove them again. The tricky part is how to determine where they go if the trigger has no modifiers. But I don't think that's the case in my first usage so I can leave that as a special case to deal with later, if ever.