The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.
Jul 12, 2023 04:27 PM
I have a long text field that takes the food and the preference of the user.
Sample Input:
Burgers (Enjoy), Pasta (Ok), Seafood (Nope), Pork (Ok), Beef (Ok), Vegies (Enjoy)
I want to get all the texts that are "Enjoy"-ed by the user.
Expected Output:
Burgers, Vegies
What formula can I use to get this output?
Solved! Go to Solution.
Jul 12, 2023 06:38 PM
I tried to make an formula in Regex.
How does this work?
REGEX_REPLACE({Foods},"\\w*\\s\\((Nope|Ok)\\),?\\s?|\\s\\(Enjoy\\)\\s?","")
Jul 12, 2023 06:38 PM
I tried to make an formula in Regex.
How does this work?
REGEX_REPLACE({Foods},"\\w*\\s\\((Nope|Ok)\\),?\\s?|\\s\\(Enjoy\\)\\s?","")
Jul 17, 2023 07:25 AM
This works fine for the sample data given but isn't working for 3-words. Thanks though!
Jul 17, 2023 04:33 PM
I had not verified that case!
Update for multiple words
REGEX_REPLACE({Foods},"[\\w\\s]*\\s\\((Ok|Nope)\\),?\\s?|\\s\\(Enjoy\\)","")