Reputation: 107
How to take a professional photograph
I want to query the above sentence and see if each word above 4 letters is contained within a list.
I want the output to be the words that match.
Ex: professional, photograph
I tried split + query + regex to no avail :(
Upvotes: 0
Views: 1207
Reputation: 107
With Mike's help, I figured it out!
=FILTER(SPLIT(B3," "),LEN(SPLIT(B3," "))>4)
Thanks Mike!
Upvotes: 2
Reputation: 15318
Try
=arrayformula(sum(--REGEXMATCH(filter(split(A1," "),len(split(A1," "))>3),TEXTJOIN("|",,list))))=counta(filter(split(A1," "),len(split(A1," "))>3))
with list = list of words, A1 the sentence
Upvotes: 1