Skip to Content
0
Apr 29, 2019 at 04:17 PM

Regex matching in SAP Conversation AI chat bot

205 Views

Hi,

I have created a chat bot using SAP Conversation AI and creating an action in it.

In the action I have provided a condition on my custom entity #fruit.

My condition statement is,

If #fruit.raw matches apple

My question is with the matches operator. Reference documentation is given here.

The matches operator follows Ruby regex syntax. I don't know Ruby I can make out the regex in documentation.

I want to do a case insensitive match. Say I want to match if the input is apple, Apple, APPLE, aPpLe, etc.

I tried using /apple/i with the matches operator but doesn't work. It even stops recognizing apple.

What am I missing here?