If you need to replace text inside other text just use the pub.string:replace service. There’s no need to use regular expressions with it, simply feed in TEST1A as the search String parameter and GOODTEST as the replacement string…
I agree that the replace service will work with this example, but imagine that we are missing something with the example (it has to be more than just replacing test1a w/ goodtest).
If the strings appear as listed, it looks like ZZ could be used as a sperator of tokens, and you can use the pub.string:tokenize service. It will produce an output string list of all the values seperated by the ZZ string. You can then do as you wish with each of the tokens.
Or…the developers guide has a section for using regular expressions, but it gets confusing at times. If you google regex help there are numerous examples.
Or…provide some more detail and someone will post a solution.