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

Maybe you can try with Text expand plugin (mentioned as “Under the Radar” by @EleanorKonik in the last Obsidian Roundup.


Getting a list of notes ($filename) where any of the blocks has the word “bless” and the word “breath” in it is simple:

```expander
block:(breath bless)
- $filename
```

Getting the contents ($match) seems to be more complex. I’ve only been able using regex and explicitly considering the two orders of the words in which they may appear inside a block:

```expander
block:(/.*breath.+bless.*/ OR /.*bless.+breath.*/)
- $match
```

This search takes more to compute. So I’ve extended the plugin’s delay confi as much as it allows:

Maybe someone knows a better solution using this plugin or another one.

2 Likes