0

Conditions

131 4 0
Posted   1 months ago

Before showing a pop-up, I would like to check if a user input (string) save within a variable contains a particular word/words. I have tried using the JavaScript includes() method within the conditions field but this doesn’t seem to work. Is there another way I can achieve this?

Comments

( 4 )
0
1 months ago     J.Steve     0   |   2  

In this situation, I would like to match keywords in a sentence.

0
1 months ago     Luke Hickey     63   |   3  

Includes() can find a match it may not be flexible enough to deal with case or other regular expression patterns. Have you looked at or experience with search()? If you’d like I can answer in that context?

0
1 months ago     J.Steve     0   |   2  

I haven't used search() before but I can see it uses regular expressions which I have some experience using in Python. If you could direct me to how I can use this method on user input strings in Dominknow, I would greatly appreciate it.

-1
1 months ago     Luke Hickey     63   |   3  

What kind of value matches are looking for? Ie a full word, a few word variants or keywords in a sentenc?

Answers  ( 0 )