Regex. Hot to get text between double braces?

Sample text

Ukraine is a country in Eastern Europe. It is the second [[largest country in Europe]] after Russia.

Things I have tried

In the global search for obsidian, I want to find [[largest country in Europe]] for any occurrence.

What I’m trying to do

So far I’ve gotten to /[.*?searching-text]]/ , but that doesn’t work correctly.

If anyone needs it, it worked for me /\[\[(.*?searching-text.*?)\]\]/

Isn’t it easier just to search for:

"[[largest country in Europe]]"

What is the advantage of using regex in this case?


I can’t search “[[country in Europe]]” or “[[Europe]]” in sample text. I want to be able to search on an incomplete match.

If you know how to do this without regular expressions, I will be grateful.

Apologies. I thought you wanted to search for whole expressions, not partial ones. I misunderstood.

Sadly, I don’t know how to do what you want with regex. Hope someone else can help.


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