[Python-Dev] Possible bug in re module? (original) (raw)
Dmitry Vasiliev dima at hlabs.spb.ru
Tue May 20 20:01:14 CEST 2008
- Previous message: [Python-Dev] Issue 643841: Including a new-style proxy base class in 2.6/3.0
- Next message: [Python-Dev] Possible bug in re module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've just found a strange re behavior:
import re re.sub("(?:ab|b|a)", "+", "cbacbabcabc") 'c++c++c+c' re.sub("(?:ab|b|a){2}", "+", "cbacbabcabc") 'c+c+c+c'
In the last case |-separated expressions seems don't tried from left to right. Is it bug or just me?
-- Dmitry Vasiliev http://hlabs.spb.ru
-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: <http://mail.python.org/pipermail/python-dev/attachments/20080520/aed084ec/attachment.pgp>
- Previous message: [Python-Dev] Issue 643841: Including a new-style proxy base class in 2.6/3.0
- Next message: [Python-Dev] Possible bug in re module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]