I have a text string that contains text within two brackets.

e.g. "testdata[3]" "testdata[-4]", "testdata[-4g]",

I wish to "extract" the string enclosed in brackets?

What is a good way to do this?

e.g.

fun(testdata[3]) = '3'

fun(testdata[-4g]) = '-4g'
       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.

	[[alternative HTML version deleted]]

