OH3 RegEX in HTTP Binding Item

Hello,
I am trying to convert within the http-Binding a html string via RegEx to a value.
There for I created an item with standard profile

If I change the profile to REGEX with the entry

\/TL300E01B01.*?[>](\d*.\d*)

I would expect to get just the value of “8.955227” but the result is nothing

What do I misunderstand?

Here the result

In OH the REGEX must match the full document. The first matching group is what gets returned. Your expression only matches a part of one line of the document. It might be as easy as adding .* to the beginning and end of your expression.

Hey, this was pretty easy. Now it works.

The only open point is the formatting with ‘%.1f’ which is not working.

I configured likt that

In the Log Viewer I get

2021-10-13 17:18:58.979 [WARN ] [.profiles.RegexTransformationProfile] - Could not transform state '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

 "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<META HTTP-EQUIV="Refresh" CONTENT="30">

<title> Address List </title>

<style type="text/css">

body { background-color:#C0C0C0; color:#0000FF; }

</style>

</head>

<body>

<h2>Liste der ausgew&auml;hlten FG-Adressen:</h2>

----------------------------------------------------------------------------------------------------

<br><pre><b>TL300E01B01       </b>Aussenluftlufttemperatur            Analogeingang mit Grenzwert

<br>13-10-21  18:20:57            <a href="fga/TL300E01B01     " target="_blank">12.43781 </a>

<br></pre>                                                                                           

</body>

</html>

' with function '.*\/TL300E01B01.*?[>](\d*.\d*).*' and format '%.1f'


with default it works, but I have then all that digits I do not really need.

Reread the docs below the State Format field.

How to format the state of the channel before transforming it…

It makes no sense to try to use %.0f on an HTML document. You don’t have just a number until after the Regular Expression transform.

You need to apply that format on the Item using the State Description metadata. Put the %.0f into the Pattern field.

Thank you,

that was a good advice.

In the metadata it works now.

Thank you again