Nested brackets

John Gruber gruber at fedora.net
Fri Sep 2 12:05:59 EDT 2005


Michel Fortin <michel.fortin at michelf.com> wrote on 9/2/05 at 11:42 AM:


> What is unfortunate is that I can't find a way to make this work with

> PHP version prior than 4.3.3. Here is what the PHP documentation says

> about it:


That's a real shame.

I *think* the reason for this is that PHP 4.3.3 started using a newer
version of PCRE, and it is PCRE that added improved support recursive
patterns and sub-patterns. I could be wrong, though, and I'm too lazy,
er, busy, to look it up.

But I also think Michel's earlier analysis is correct: a simple pattern
that looks 6 levels deep for nested brackets ought to be enough for
99.999 percent of the cases. So far as I know, no one has yet complained
about this limitation in the current PHP code.

-J.G.


More information about the Markdown-Discuss mailing list