How do I create a regex in Emacs to capture text between double square brackets?

emacs, regex

Solution

This regexp will select the square brackets but by using group 1 you will be able to get only the content: `"\\[\\[\\(.*\\)\\]\\]"`

Problem

I want to create a regex in Emacs that captures text between double square brackets. I found this regex. It allows to find string betwen square brackets but it includes the square brackets : ``` "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]" ``` How can extract the string between double square brackets excluding the square brackets?

Original source