Hello,
I have a question how to extract data out of a HTML file with regex. From my ESP8266 together with a BME680 I get the reading via a HTML file.
The output is like this:
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="30"></head>
<body><h1>BME680 Raum 1</h1>
<div><p>Temperatur:
21.30
°C</p><p>Luftfeuchtigkeit:
58.76
%</p><p>Luftdruck:
969.59
hPa</p><p>Gaswiderstand:
19.02
KOhms</p><p>Luftqualität:
26
IAQ</p><p>Meeresspiegel:
370.96
m</p></div>
</body></html>
Now I want to get the temperature value out of the file.
How can I manage to only the number after “Temeratur:” and not the rest of the numbers?
Thanks for any tips or help.
Cheers
Dirk
Platform information:
- Hardware: Raspberry 3b
- OS: openhabian
- openHAB version: 2.5.1-2