On 15 November 2013 06:48, Tim Peters <tim.pet...@gmail.com> wrote: > Is that a feature? Or an accident? It's very surprising to find a > non-empty match inside an empty match (the outermost lookahead > assertion).
Personally, I would read (?=(R))" as finding an empty match at a point where R starts. There's no implication that R is in any sense "inside" the match. (?=(\<\w\w\w\w\w\w)\w\w\w) finds the first 3 characters of words that are 6 or more characters long. Once again, the lookahead extends beyond the extent of the main match. It's obscure and a little bizarre, but I'd say its intended and a logical consequence of the definitions. Paul _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com