I have a situation where I’m wanting to see if 1 of 5 words are found in the input sentence. A Switch module seems the best option but I’m not sure if using a regular expression is meant for this scenario.
If the input sentence has “getting” (upper/lower case), then output purchased_gid.
If the input sentence has “uforward” (upper/lower case), then output purchased_uf.
etc.
Only one of the words would be found in the input sentence. So no checking for multiple instances.
e.g.
Input → UForward Planner.
Logic steps:
- → “getting” NOT found in sentence.
- → “uforward” found in sentence so output purchased_uf.
Would this be a job for Switch and regular expressions?