This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients jorendorff, mark.dickinson
Date 2008-04-04.17:41:10
SpamBayes Score 0.212823
Marked as misclassified No
Message-id <>
I'm almost tempted to call the first of these a bug:  isn't '((x|y)*)*'
a perfectly valid (albeit somewhat redundant) regular expression?  What
am I missing here?

Even if there are issues with capturing, shouldn't the version without
capturing subexpressions still work?

I get:

>>> re.compile(r'(?:(?:x|y)*)*')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/", line 180, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.5/", line 233, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat
Date User Action Args
2008-04-04 17:42:09mark.dickinsonsetspambayes_score: 0.212823 -> 0.212823
recipients: + mark.dickinson, jorendorff
2008-04-04 17:42:09mark.dickinsonsetspambayes_score: 0.212823 -> 0.212823
messageid: <>
2008-04-04 17:41:12mark.dickinsonlinkissue2537 messages
2008-04-04 17:41:11mark.dickinsoncreate