REGEX (matches) not working in long strings (?)
Posted: 15 Aug 2016 12:03
Hello,
I want to make the phone silent whenever the calendar has an entry. However this should not happen if the calendar entry has the word "home" in the title or if the calendar entry has the word "Reise" in the description. The first part (home office, Homeoffice, etc) is working well. However for some reason, the word "Reise" in the description is not recognized [ matches (event_description , ".*Reise.*") ]. What am I doing wrong?
Below is an excerpt from the log, where you can see that the description does indeed contain the word "Reise" but the expression leads to "false".
...
{event_calendar=Kalender,event_availability=BUSY,event_start=1471196340000,event_description=Reise: Zürich HB nach Winterthur
Datum: 14.08.2016
-
Ab 19:37 Zürich HB - Gl. 14 (IR 2133, Richtu...,account_type=AquaMail (Exchange),event_location=Zürich HB,event_title=Zürich HB - Winterthur,triggertime=1471196340004,event_all_day=false,flow_name=Kalender Eintrag Beginn,event_id=272,trigger=Kalender Event: Kalender: AquaMail (Exchange):Kalender Normaler Event Beschäftigt (genau bei Beg...,event_end=1471197900000}}
14.08.2016 19:39:00.008 [Kalender Eintrag Beginn]
Start executing condition 'Expression: matches (toLowerCase(event_title) , ".*home.*") OR matches (event_description , ".*Reise.*")'
14.08.2016 19:39:00.009 [Kalender Eintrag Beginn]
Start executing action 'Benachrichtigung auf Bildschirm: {matches (toLowerCase(event_description) , ".*reise.*")} (lange)'
14.08.2016 19:39:00.263 [Kalender Eintrag Beginn]
End executing condition 'Expression: matches (toLowerCase(event_title) , ".*home.*") OR matches (event_description , ".*Reise.*")' with return value false
...
The calendar event is imported from the timetable of Swiss Railway (SBB). My phone is running on Android 6.0.1.
Any hint will be much apreciated!
I want to make the phone silent whenever the calendar has an entry. However this should not happen if the calendar entry has the word "home" in the title or if the calendar entry has the word "Reise" in the description. The first part (home office, Homeoffice, etc) is working well. However for some reason, the word "Reise" in the description is not recognized [ matches (event_description , ".*Reise.*") ]. What am I doing wrong?
Below is an excerpt from the log, where you can see that the description does indeed contain the word "Reise" but the expression leads to "false".
...
{event_calendar=Kalender,event_availability=BUSY,event_start=1471196340000,event_description=Reise: Zürich HB nach Winterthur
Datum: 14.08.2016
-
Ab 19:37 Zürich HB - Gl. 14 (IR 2133, Richtu...,account_type=AquaMail (Exchange),event_location=Zürich HB,event_title=Zürich HB - Winterthur,triggertime=1471196340004,event_all_day=false,flow_name=Kalender Eintrag Beginn,event_id=272,trigger=Kalender Event: Kalender: AquaMail (Exchange):Kalender Normaler Event Beschäftigt (genau bei Beg...,event_end=1471197900000}}
14.08.2016 19:39:00.008 [Kalender Eintrag Beginn]
Start executing condition 'Expression: matches (toLowerCase(event_title) , ".*home.*") OR matches (event_description , ".*Reise.*")'
14.08.2016 19:39:00.009 [Kalender Eintrag Beginn]
Start executing action 'Benachrichtigung auf Bildschirm: {matches (toLowerCase(event_description) , ".*reise.*")} (lange)'
14.08.2016 19:39:00.263 [Kalender Eintrag Beginn]
End executing condition 'Expression: matches (toLowerCase(event_title) , ".*home.*") OR matches (event_description , ".*Reise.*")' with return value false
...
The calendar event is imported from the timetable of Swiss Railway (SBB). My phone is running on Android 6.0.1.
Any hint will be much apreciated!