Help: Split based on... Contains any of? [Studio]

Hello,
In Studio, I'm trying to figure out how to match on a split based on a "contains any of" (think a SQL ilike '% %').
So if I have the body of the previous message
Your cart contains apples and bananas.
I want my split to match for
Contains any of
kiwi, watermelon, apples
The execution would then see apples in the body and give a positive match.
"Matches any of" doesn't work because it's looking at the whole body of the previous message, and contains doesn't work because it's looking for the full string (kiwi, watermelon, apples). I know "contains any of" isn't a supported operator, but I'm hoping there's a way to hack it?
Answers
-
@ssengupta can you help with this?🧐
-
Hi @brycecareof,
I just sent you an email regarding this. I am resharing it again here so other community member can find it:
We have an open feature request to add a Contains Any Of option, but you can implement this yourself right now using the Regex option.
Are you familiar with regular expressions? This should do the trick:
.*(kiwi|watermelon|apple).*
. That would match any string that contains kiwi, watermelon, apples. Is this what you were hoping to do? -
Thanks – wasn't sure if the forums were used actively but now I know they are. Will try now!
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups