Refactor: CTS: Add the output regular expression mangling back.
For now, it's only the regexes needed to make the daemon tests pass plus the framework for running them all. More regexes will be added as required.