How to export content of multiple files from search results?

You can try this script:

File content with or without YAML can be copied based on searches with empty line as delimiter.
Useful especially for people who have H1 titles in their files.