Trouble with REGEX Transformation

Hi Community,

i am having some trouble integrating my PiAware into Openhab.

I have two websites from which I want to display figures to my openhab sitemap.

Website 1: Local raspberry pi website with information about planes / messages etc.
Website 2: My public Flightaware userwebsite with statics.

I will be concentrating about the public site for everyone to :

As an example, I want to display my current rank on my sitemap.

The HTML code is as follows:

<span class="memberDetailsLabel">Highest User Ranking Achieved in Last 30 Days: </span>
<span class="memberDetailsValue">16,418</span></li>

Two of my items are:

String      Planes          "Planes [%s]"  (Test)    {http="<[*id=)(.)(dump1090_total_ac)(.)(>).*(<)(.)(span>))]"} 
String      Rank            "Rank [%s]"    (Test)    {http="<[*class=)(.)(memberDetailsValue)(.)(>).*(<)(.)(span>))]"} 

Some how i do not get any of the items to show any value properly.

Does anyone know what i am doing wrong?



In openHAB REGEX works a little differently from normal. The expression must match the entire String/document and the first matching group is what gets returned. So your second Item’s expression would need to be something like


Hi Rich

Thanks for the quick reply.

I am not getting the complete website. If i am not mistaken REGEX should look up only the line in question. Or am I wrong here?

Like I said. REGEX works differently in OH. You have to match the entire string passed to the transform and only the first matching group gets returned.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.