The Input Line goes like this (just a part of it):
[[Text Text Text]][[text text text]]asdasdasdasda[[asdasdasdasd]]
What I want is to list all matches wherein text enclosed in a pair of [[
and ]]
.
I did try several patterns, but all fails when a unclosed [[
or ]]
is within the input line. For example:
[[text[[text text TEXT text]]
Also, what if a single bracket exist within the input line, like:
[[text [text] text TEXT text]]
The regex pattern I used was:
\[\[[^\[\[]*\]\]