[Solved] Extract content between brackets

I would like to extract some content from a variable that is in square brackets. How do I extract the content?