Hi all,
I have OH 3.4.2 and in a rule I have this:
UPS_1_RUNTIME.postUpdate(transform("JSONPATH","$.upses[0].timeleft", json).replaceAll("[^\\.0123456789]",""))
I did this because value to parse is "timeleft": "105.0 Minutes"
but i need only numeric part. This value are retrieved by HTTP Binding. It is possible to setup a replace into thing configuration here:
Without using rule?
Thanks
Ap15e
(BK)
March 17, 2023, 5:31pm
2
marcolino7:
105.0 Minutes
Just append
∩REGEX:([\d.]+).*
to your State Transformation (make sure RegEx Transformation is installed).
2 Likes
Ap15e
(BK)
March 17, 2023, 10:33pm
4
1 Like
Never used before in my life
thanks a lot
Ap15e
(BK)
March 17, 2023, 10:49pm
6
One of the first mathematical operators I learned about in elementary school. At that time, mathematical education began with abstract set theory …
1 Like
Ap15e:
∩REGEX:([\d.]+).*
I am 46, made elementary school in 1983, perhaps in Italy this symbol is not used, never seen in my life.
Thanks
Sounds like you know this one ?
yes, I know but never used at school at all
Ap15e
(BK)
March 18, 2023, 11:05am
10
Not abstract enough , at that time an aspiring mathematician needed nothing more than: Schüler Wendeplättchen inkl. Aufbewahrung | BETZOLD