Regex problem mqtt binding


I have a Problem with reading a mqtt topic.

In the topic ist data froma dht22 sensor and every line looks like this:

{"temperature": 24.6, "humidity": 57.8}

The item configuration looks like:

Number Fabian_Temp "Innen Temperatur [%.1f °C]" <temperature> ["CurrentTemperature"] {mqtt="<[local:home/temp/fabian:state:REGEX(e": ([-+]?\d*\.\d+|\d+))]"}

I want to read the first float number from the string. In the reexsimulatror it seamed to work, but openhab say in the log:

09:01:43.121 [DEBUG] [o.client.mqttv3.internal.ClientState] - openhab.1496035521967: received key=0 message=PUBLISH qos:0 retained:false dup:false topic:"home/temp/fabian" payload:[hex:7b2274656d7065726174757265223a2032342e34 utf8:"{"temperature": 24.4" length:39]
09:01:43.123 [DEBUG] [] - Send SSH_MSG_CHANNEL_DATA on channel 0
09:01:43.130 [DEBUG] [] - Writing 160 bytes
09:01:43.132 [DEBUG] [client.mqttv3.internal.CommsCallback] - openhab.1496035521967: new msg avail, notify workAvailable
09:01:43.136 [DEBUG] [client.mqttv3.internal.CommsCallback] - openhab.1496035521967: call messageArrived key=0 topic=home/temp/fabian
09:01:43.144 [DEBUG] [client.mqttv3.internal.CommsReceiver] - openhab.1496035521967: network read message
09:01:43.150 [WARN ] [] - given new state is NULL, couldn't post update for 'Fabian_Temp'

Can anybody see the problem?

Given it’s giving you back JSON I’d just use JSONPATH($.temperature) (don’t forget to activate the JSONPATH plugin)

If I were to try and guess the right REGEX for the job I’d probably guess something like REGEX(.*([-+]?\d*\.\d+).*)

Thank you. Realised it just bevor you wrote.