@Chaley,
Thanks for the quick reply, I'm trying to learn my may around with template functions and the best way for me is to learn by trial and error and I try to learn from previous posts or the Calibre manual but I'm missing some basic examples to make me understand sometimes and some of the posts are too advanced for me to understand for now. I even started some free online phyton code writing course to improve my understanding of the examples on this forum. So more questions are likely tbh, if this is not the place but a separate thread is, then by all means move it, I wouldn't know how to (if allowed at all).
To answer your question, yes this was a continuation of my post on the 14th. I thought I had figured it out, but guess not

.
I do not care about the order of the tags, but good to know it exists. Obviously the data is bogus, I was trying to change 2 out of the 4 tags by matching the whole string while keeping the rest in tact. Perhaps my example was not so clear since I also had two tags as the outcome.
But for clarity another example people use ship names in characters for example 'Clexa' and 'Princess Commander' the character names are Clarke and Lexa, so I'm trying to convert these lists of ship names into separate characters. Since AO3 keeps inventing new tags I occasionally dump the new / left over data into excel and figure out which I want to keep and change and then auto convert them into strings that I copy back adding into an new/or existing line in the action chains. There are built in options, but the Search and Replace box was becoming to small and unreadable and single field edit annoying because you can not amend you list but in stead have to select it all over again. Which is why I was looking into these template functions to begin with.