Filtering name from a thing string

Release = Raspbian GNU/Linux 10 (buster)

Kernel = Linux 5.10.17-v7+

Platform = Raspberry Pi 2 Model B Rev 1.1

OH Version = 3.02

I’m using iCal and I have events where the current event name string can be “UNDEF, Blocked, or Reserve - GuestName”. I would like to parse the guest name into an item. I was investigating profiles but I don’t believe it is possible. I was hoping to avoid running a script to filter the latter part of the string based on the “-” delimiter. Any ideas?

Have you tried Regex:
I’m not that of an expert, but with the expression


You will automatically get the guestname (try it e.g. with
Unfortunately with the leading whitespace, but there’s for sure an regex expression that also will eliminate this.

Why not? You can do just about anything in a javascript transform profile.

Thanks for the prompt feedback. I installed the Regex transformation and added the expression to the item properties. Will test it tomorrow when the calendar entry gets updated.

Thanks for suggesting the javascript transform profile. I created a filename.js in transform folder and used the javascript split() function to split the input based on " - " and return the second element of the array. I’ll be able to test both javescript and the regex suggestions tomorrow when the calendar event gets updated.