This is similar to a question that has already been asked. However, I am looking for a Sed specific answer. I have text similar to the following:
Some sample text [with some extra text].foo
I need to grab just the text inside the brackets. My attempts thus far have been futile. I can parse the line with other tools but I can't seem to get Sed to parse it correctly.