I have a table of products
Product
Vegetable
Soup
Meat
Fish
I have a list of items:
Item
Fish and Vegetable Soup
meat soup
Fish and Vegetable
now i want to extract each match from above via a regex function
I thought it would be as as simple as
{=REGEXEXTRACT(A2,TEXTJOIN('|', TRUE,PRODUCTS!A2:A))}
however this returns none or just the first match in my list.
target output:
Item |Expected Output
Fish and Vegetable Soup |Fish, Vegetable, Soup
meat soup |Meat, Soup
Fish and Vegetable |Fish, Vegetable
demo sheet here
given that D2 is the text I want to use the expression on, and A2:A is my list of products.
Thanks!


