Format an item string text for display on the sitemap

hi,

I’m reading a list of events from my google calendar using the caldav binding resulting in the follwing item:
String CalDav_Muell_Termin1 “Tonne: [%s]” { caldavPersonal=“calendar:‘Muellkalender’ type:‘UPCOMING’ eventNr:‘1’ value:NAME” }

The result in the sitemap is the NAME of the event in the calendar:
“A.R.T. Abfuhrtermin: Altpapier & Gelber Sack”

Instead I would like to only display in the sitemap “Altpapier & Gelber Sack”. That means always removing the string "A.R.T. Abfuhrtermin: ".

I’ve tried to apply the REGEXP transformation on the value of the item but this was just ignored.
I’ve searched the forum up-and-down but I’m failing to find an approach.
Could someone point me in the right direction ?

I’m running OH2.2 on a raspberry3

thanks a lot for your input !

Just remove it from the calendar. Easy.

Another option is to create a virtual item and use a rule to store the adjusted string into it.

@andy95 try to use the regex at the label.

String CalDav_Muell_Termin1 "Tonne: [REGEX(s/.*:(.*)/$1/g):%s]" 

And i think its REGEX and not REGEXP this could also have been a problem.

thank your for response Josar!

and your proposal is 100% working thanks a lot !
I had to install the REGEX transformation binding also and then it started working like a charm !

thank you again !
andy

@andy95 did you install the Regex Transformation?

with Paper UI go to

http://<YourIP>:8080/paperui/index.html#/extensions

Then choose Transformations in the menu in the orange area of the page and install the RegEx Transformation.

hi Josar,
you saw exactly what I was missing, spot on !
thanks a lot !
andy