Okay so after looking at it, it looks like: ([^\]]+) is basically saying, match anything not a close-bracket. I would use a (*) instead of a (+) for the reason of the empty div discussed above.
I question whether (?>) might be of use
Additionally, I don't know how I would stream the text. It's a parameter passed from a webform.