I went to the source to check the format of the mqtt payload and found that this was a good one:
{"_timestamp": 1517190629, "actual": 42.1, "target": 65.0}
So I went to https://regex101.com/ and tested it and sure enough it works. I refactored for ‘’ escape characters and
I used this
String Carlos "Carlos [%s]" {mqtt="<[mosquitto:carlos/temperature/bed:state:REGEX(s/(.{28})(actual)(.{3})(\\d*.\\d*)(.{3})(target)(.{3})(\\d*.\\d*)(.{1})/$2-$4 $6-$8/g)]"}
And now it’s actually printing the REGEX(s/…blah blah)…wait, how can it do that? I checked and made sure the REGEX transformation is installed. I am a bit baffled.
UPDATE without changing anything I did a refresh and it worked!!! - Now I have two 3D printers so I set up the other one with the same REGEX and blow me down with a feather, it worked straight away. - Thank you guys for your help and ideas. I think I am off to the races now. - I will go through the other mqtt payloads and set up REGEX transformations accordingly.