this is not a bug. it is intentional and there is nothing to be fixed
correct your BBC and it will all be correct.
The reason you are seeing issues is because you are not entering correct/closed BBC tags
Like the others say, this is a bug on multiple levels:
1. It rejects perfectly valid BBCode. Here's another example that breaks: http://pastebin.com/LmA1MbAJ I cannot post it on this forum because otherwise it will tell me the post is empty, hence I posted a link.
2. It doesn't tell the user. When your post just turns up empty, it's not your fault, it's the forum's fault. Especially if the forum doesn't tell you why.
That being said, this kind of problem really should not be solved with regular expressions.
Yes, it is a bug, an incidental one but a bug in the end.
The problem you're facing is a derivative from another one (prevent empty BBC codes). The regex used doesn't caught several BBC formats already posted here, the code's logic dictates to remove the failed test, which result in an empty post and thus the "your message is empty" message appear.
The empty message problem shouldn't be dealt with regex, thats for sure, but the empty BBC tags (the original issue) does.
We cannot change our current BBC parser to another more robust solution like a string tokenizer, therefore, regex and/or a combination of php logic plus regex is what we are going to use.
If you would like to help us, please keep posting valid BBC formats that breaks the current regex, that way we have more options to test our patch against.