Wow, it bloody works. Would you mind explaining what the '?' does, and how you knew to use it?
Thanks a heap man.
EDIT: From what I understand, it means that the phrase can occur 0 or 1 times.
? makes the .* "ungreedy", so it doesn't match the ( or [. Alternate way (untested):
'%\][^\(\[]+[\(\[]%i'
Not sure if you needed the capturing parentheses but I removed them.
I understand your alternate solution better, and will have to try it later. Thanks for the explanations though, and for both solutions.
If I understand correctly, the alternate solution utilises the regex operator of NOT EQUAL TO. Thus it is saying grab everything after ']' that is not '(' OR '['.