Twilio Studio does not have a Widget that I would call CONTAINS ANY so I am trying to create a test using the Regex option and in a voice context. For example, if the phrase could be get the mail or open the mail or open mail, then I could create 3 separate Contains Conditions and route them to the same branch element. But I would like to just have one Condition that would check for any Contains.
This is not a big problem for just a few possibilities but with many possibilities the Studio Flow Chart gets very messy and there is a lot of adding additional Conditions.
It would be nice to just make the Condition be a Regex condition that "fakes" the missing CONTAINS ANY condition.
I use regx101 code/syntax creator to develop Regex code and test it. The following code checks out legitimate in rex101 but doesn't work in Twilio studio.
/get the mail|open the mail|open mail/mg
Realizing that syntax is everything. I must be overlooking something very important. Or Regex conditions just will never work with voice.
I have attached a screenshot of the Studio CONDITION that doesn't work.
I have also pasted in the section of JSON code generated by Studio but with different phrases than my example.
I need help in making this work.
"next": "say_play_1", "event": "match", "conditions": [ { "friendly_name": "If value regex /open the flower|get flower/mg", "arguments": [ "{{widgets.gather_mailbox_answer.SpeechResult}}" ], "type": "regex", "value": "/open the flower|get flower/mg"
