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 <dima at hlabs.spb.ru> 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>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4