botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Actions or intents should allow an array of RegEx

Open MironV opened this issue 10 years ago • 1 comments

Currently, you can only have one RegEx action or intent. The reason this is problematic is that you may have multiple RegEx templates for extracting data that all ultimately correspond to the same thing. Combining them into one massive RegEx is very impractical, especially if you then need to extract the data using a match array.

Currently the workaround is to create multiple actions and append a number to them (getweather1, getweather2, etc.) then map them to the same dialog. This seems pretty messy.

MironV avatar Jul 29 '16 16:07 MironV

In v3.2.1 there's a new IntentDialog.matchesAny() method.

Stevenic avatar Aug 05 '16 01:08 Stevenic