Switch Node - rules limitation

When utilizing the switch node, is it possible to provide multiple variables on a single rule /test such as:

or does each word need to be a separate check?
st

"Contains" only matches the string given.

But you could use "matches regexp" and use a regular expression.

Just separate your terms with |. Something like Hot|hot|Cold|cold. Could be optimized of course if you know your way about regular expressions, like [Hh]ot|[Cc]old.

2 Likes

Terrific. Thanks kuema.

1 Like

Very powerful tool these regular expressions.

If you want to play around with those, you can use this site. Just select "ECMAscript" as flavor.

THAT is a handy tool!

You could also use JSONata to achieve what you want.

Hi, other online regex testers:
https://extendsclass.com/regex-tester.html
https://www.regextester.com