> On 21 Dec 2020, at 13:46, Taco Hoekwater <t...@elvenkind.com> wrote: > > > >> On 21 Dec 2020, at 13:16, Mojca Miklavec <mojca.miklavec.li...@gmail.com> >> wrote: >> >> My only explanation would be that perhaps "^1" is so greedy that the >> rest of the pattern doesn't get found. But I don't want to believe >> that explanation. > > Which (of course) means that that is exactly what happens ;) > > The ones that match are > > ababbb (a (ba+bb) b) => r4 r1(r3(r5 r4) r2(r5 r5)) r5 > abbbab (a (bb+ba) b) => r4 r1(r2(r5 r5) r3(r5 r4)) r5 > > With the ^1, in the “bb” cases the first “b” eats all three “b”s: > > ababbb fails the r5 at the end
Sorry, that was wrong, it fails at the second r5 in the r2 as well, for the same reason as below. > > abbbab fails the first r2 already (since the second r5 therein never happens) > > Best wishes, > Taco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________