A query for blocks, each of which contains two certain words, to gather into one new file?

Glad it work for you!
I am sorry that I cannot help explain about the search function and regex. I ran into the same problem as you, and some one else in the community helped me. Maybe @andrezgz or @ryanjamurphy can help you.

I think the vantage plugin will also be beneficial for you.