String.find's values into an array

I’m trying to find a specific word in a text using string.find. But because there are too many words that I need to find, I want to shorten it. So how do you turn this:

local start, ending = string.match(s1, "a phrase")
local start2, ending2 = string.match(s2, "another phrase") --s1, s2 are strings
-- more lines that is like above

into an array?

Link to a similar question: here

Edit: summary to that similar question:

1 Like