In PCRE, it doesn't trackback after the first match for a recursion is found. So
(?(DEFINE)(aaa|aa|a))(?1)ab
doesn't match
aab
because after it matched aa in the recursion, it never try again to match only a.
aa
a