Regex | searching combination of internal links in a block

Many times I have to search through ideas in my vault where I am looking for two internal links appearing in one block/paragraph.

for example, if i search for:
[[water]] [[oxidation]] or
from the search field in my vault, I get results where one md file contains both these internal links, even though they might not be in the same block.

I have been told that Regex should be able to catch links inside one block, but I am still learning it.

Would appreciate if any regex expert can throw some light on this. :slight_smile:

I started playing with this a little bit, but I think it’s going to be a tough regex search. It would be simpler if the two links might always be right next to each other, but if I understand it correctly, you’re searching for…

a newline, an arbitrary set of characters, [[some link]], an arbitrary set of characters, [[a second link]], another arbitrary set of characters, and then another new line.

You can input some sample text you want to use and experiment with RegEx options at

1 Like

Thanks for your suggestions.
I will try out these

This is solved by block:(...) search operator.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.