Could use some help with regex

  1. Your regex seems not to be the same as as posted from @rlkoshak.

  2. I think as your regex is embedded into a string you have to properly escape the backslash.

https://docs.openhab.org/addons/transformations/regex/readme.html#differences-to-plain-regex

  1. As it seems that you want to match a multiline string you need something like
"REGEX(s/.+\\s.+(.*)/$1/g)"

Explain in detail in this post.

I did not test it but it should be something like

Number Power { mqtt="<[mosquitto:Electricity/EL/Energy/Import/kWh:state:REGEX((\\d*.\\d*).*)]" }
DateTime Power_Time { mqtt="<[mosquitto:Electricity/EL/Energy/Import/kWh:state:REGEX(s/.*\\s(.*)/$1/g)]" }