Issues with Python 2.2. regex
Fredrik Lundh
fredrik at pythonware.com
Fri Dec 21 11:28:19 EST 2001
Jürgen Hermann wrote:
> Given this:
>
> (?P<heading>^\s*(?P<hmarker>=+)\s.*\s(?P=hmarker) $)
>
> Python 2.2 reports groups for the nested named parens, while previous
> versions do not. If this is unexpected, I'll isolate this effect in a little
> script.
what previous versions did you try this on? if I apply the above
expression to the string "=== hello === ", groupdict() returns the
same dictionary for all versions I have installed (1.5.2 through 2.2)
{
'hmarker': '===',
'heading': '=== hello === '
}
what did you get?
</F>
More information about the Python-list
mailing list