in reply to Maximal match in a recursive regex
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). :)
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Maximal match in a recursive regex ([^][]+)
by diotalevi (Canon) on Jun 26, 2003 at 18:29 UTC |