Problem with http binding, REGEX syntax

Hello everybody,

I’ve been trying to read data from a device with http binding for a while.
My item for collecting all data looks like this:
String Test_Value1 "Performance [% s]" {http = "<[ ((. *))]"}

I get the entire content back.
Now I only want the value 160 from the line

<div id = "pos20"> 160 </div>
I just don’t get the syntax for the REGEX correctly.
There are always errors in the single quotes of “pos20”.

Can someone please help me there?
Thanks a lot!

I’m horrible at REGEX but maybe this post can help you.


Thank you!
The REGEX tester from was a great help for me.

1 Like

I was hoping you would find the post useful.:+1: I keep them bookmarked just for the REGEX users.:wink:

Hi there,
I was able to solve the problem.
{http = "<[ (. *? <div id = .pos20.> (. *?) </div> (. *) )] "}
The value has a fixed number of characters.
The missing characters are also filled in with &nbsp; and displayed.
This is a space as a wildcard.
e.g .:

Can I use a replace function to remove the &nbsp; characters?

Thanks a lot!