Triggering substring from string

xavmd

New member
Hi all,
I am fighting to trigger on received notification for only specific substring as " Off Raz Status A+ A- Alerte " to start action.
I read a lot, I try many things nothing good.
Realy beginer in needing help.
Thanks.

No one interested by my issue, it may be a too basic issue or silly question? I am sorry but I don't how to code constrain to valid Trigger for only one of the substring above. It is possible?
Of course I can code 6 Triggers or multiple Actions, but I am on this forum to learn nice and efficient coding that could also help other.
Thank you for understanding.
 
Last edited:

MacroDroidDev

Administrator
Staff member
If you are dead set against using multiple triggers (which is bay far the easiest way), then you should be able to do it with a regular expression.

I'm not a regex expert, but I suspect it's the sort of thing ChatGPT would be good at creating.
 

JA-Translator

Moderator
I don't how to code constrain to valid Trigger for only one of the substring above. It is possible?
Of course I can code 6 Triggers or multiple Actions, but I am on this forum to learn nice and efficient coding that could also help other.

As @MacroDroidDev advised,

The easiest way is to use several triggers.

But you can also use regex expression.
You can easily find a useeful site with key-word search.

how about the link
how to use regex expression
at Mozilla org.


ChatGPT also sounds interesting.
 

xavmd

New member
Thank, problem is I don't know how to put constrain in Trigger "Macrodroid Specific" does not show input for regex or script.
My initial goal was not to go in Action to do that.
Sorry to take your time .
 
Top