Huh. My first thought is that your qr operator is using [ and ] as delimiters. And you have [.\n] in your regex. Seem like a problem?
I only briefly read the other replies, to see if someone else pointed this out. So this might not be the problem at all -- or the only problem. But...
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |