regexp weirdness (bug?)

2005-04-05 Thread Sergey Schetinin
Here's the session log:

>>> _re_pair="(?(plus).|-)"
>>> _re1=("(?P\+)"+_re_pair)
>>> _re2=("((?P\+))"+_re_pair)
>>> _re3=("(?:(?P\+))"+_re_pair)
>>> _re4="(%s)"%_re3
>>> import re
>>> print [re.match(_re, "+a") and 'match' for _re in [_re1, _re2,
_re3, _re4]]
['match', None, 'match', None]

this is not the supposed behaivour. all theese patterns should match,
right?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: regexp weirdness (bug?)

2005-04-06 Thread Sergey Schetinin
it's line #159 here, but it did work! thanks. so it IS a bug?

-- 
http://mail.python.org/mailman/listinfo/python-list