[issue7132] Regexp: capturing groups in repetitions
Philippe Verdy
report at bugs.python.org
Thu Oct 15 02:26:56 CEST 2009
Philippe Verdy <verdy_p at wanadoo.fr> added the comment:
>> And anyway, my suggestion is certainly much more useful than atomic
>> groups and possessive groups that have much lower use [...]
>Then why no one implemented it yet? :)
That's because they had to use something else than regexps to do their
parsing. All those that had to do that *pested* that the regexps were
not capturing all occurences.
And then later they regretted it, because they had to fix their
alternate code (such as those using the bogous split() alternatives...)
and finally rewrote their own parsers (sometimes with a combination of
(f)lex+yacc/bison, even if the full expression was given in a single
regexp which was expressive enough to match only the exact match they
wanted, but without using the returned captured groups): this means an
extra parsing for the found substring (in their correct context) in
order to process it.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7132>
_______________________________________
More information about the Python-bugs-list
mailing list