0

Conditions

1672 4 0
Posted   2 years 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
2 years ago     J.Steve     0   |   3  

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

0
2 years ago     Luke Hickey     279   |   4  

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
2 years ago     J.Steve     0   |   3  

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
2 years ago     Luke Hickey     279   |   4  

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

Answers  ( 0 )