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 Renji
Recipients Renji, ezio.melotti, mrabarnett
Date 2021-01-09.01:25:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I can compile "((a)|b\2)*" expression and this expression successfully return captures from first repetition and second repetition in one time. But if I write (b\2|(a))* expression, I get "invalid group reference 2 at position 3" error. Either first or second behavior incorrect.
python3 --version Python 3.7.3

import re
text="aba""(b\2|(a))*",text) - not worked"((a)|b\2)*",text)
    #show aba ba a
    print(" "" "
Date User Action Args
2021-01-09 01:25:31Renjisetrecipients: + Renji, ezio.melotti, mrabarnett
2021-01-09 01:25:30Renjisetmessageid: <>
2021-01-09 01:25:30Renjilinkissue42871 messages
2021-01-09 01:25:30Renjicreate