Just a quick note that I consider using [^][]+ in a regex to be obfuscation. (: I realize that backwhacks are a bit ugly, but I don't condone relying on the little-used trick that ] is not special when it is the first character (including after the optional "^") of a character class.
I'd prefer [^\[\]]+, even though the eye doesn't have the easiest time lining up the brackets (it is ugly while your construct is pretty but misleading, like an optical illusion). :)
- tyeIn reply to Re: Maximal match in a recursive regex ([^][]+)
by tye
in thread Maximal match in a recursive regex
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |