Because the regex starts where it left off and it already matched the first two characters of "{{{" to become "{empty{{" so it starts looking at the third "{" and, from there, never finds "{{".
*{john{david{mary{{{martin}
^ Start there looking for {{ or {}
{john{david{mary*{{{martin}
^ stop here, having found a match
{john{david{mary{empty{*{martin}
^ resume here
no {} nor {{ left to find from there
Update: Unless you are asking why it would only match once against "{{{{", in which case the answer is "it doesn't; it matches twice".
-
tye
(but my friends call me "Tye") |