I have the following regular expression in two different languages that produces the same odd results (javaScript and Flash). What I want to know is not how to fix it, but
Try including the * quantifier inside the capture group, like this:
*
\[((?:\\{2}|\\\]|[^\]])*)\]