I'm trying to sort through a set of matchers and a set of strings such that if I have
matchers = ['foo', 'bar', 'abc']
and
strings = ['afooa', 'zbarz', 'abcabc', 'purple', 'foobar']
I'd like to be able to get any element of strings where any element of matchers is a substring, such that
results = ['afooa', 'zbarz', 'abcabc', 'foobar'], ideally without just resorting to nested for-loops.
I've looked around for a while, but this is kind of a hard question to frame in searchable terms, so even any advice on the search front that anybody has would be much appreciated.