I'm trying to trigger using Notification on Statusbar Displayed when the content of the notification does not contain the text "Location sharing in progress". I'm trying to use 'regex matches' with
^((?!^Location sharing in progress$).)*$
but it's not triggering.
Anyone have any ideas why not, or a better way of doing this?
Regex help
Moderator: Martin
Regex help
Last edited by Wibbly on 10 Sep 2019 10:38, edited 1 time in total.
Re: Regex help
I tried the regex in regex tester, it should be working if the text is exactly NOT "Location sharing in progress".
But your app notification might put additional space or newline (\n) after the text. Even a single additional char will make the regex fail.
Try to use debug dialog, let it match all and put debug dialog after the notification trigger. Copy the value of the notification content and paste it regex tester to be sure.
If there is additional space or newline, you should see it there.
But your app notification might put additional space or newline (\n) after the text. Even a single additional char will make the regex fail.
Try to use debug dialog, let it match all and put debug dialog after the notification trigger. Copy the value of the notification content and paste it regex tester to be sure.
If there is additional space or newline, you should see it there.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Regex help
Thanks. I found it never fires even with very different strings. But I found a workaround with a separate condition that uses a script that works.