I have found some regex to match textblocks between brackets. However, what if I have some String with nested brackets and I only want the most external part of it.
eg. "foo bar [first [second] [third]] asdf ]]]]"
I would like to be able to match the text between the first opening bracket and it's closing bracket, leaving everything inside intact.
Result would be: "[first [second] [third]]"