Given a string containing some number of square brackets and other characters, I want to find all closing square brackets preceded by an opening square bracket and some number o
"^[^\[]*\[[^\]]*?(\])"
is the group(1) what you want?