New submission from Armin Rigo <ar...@users.sourceforge.net>: The re module is buggy is rare cases; see attached example script.
The bug is caused by the macros LASTMARK_SAVE and LASTMARK_RESTORE which are sometimes used without the extra code that does if (state->repeat) {mark_save()/mark_restore()}. The bug appears by mis-reporting the position of groups within a repeated match (with * or +), notably the position of some groups that matched in older repetitions but (after some backtracking) not in newer ones. ---------- components: Extension Modules files: x.py messages: 109019 nosy: arigo priority: normal severity: normal status: open title: sre bug: lastmark_save/restore versions: Python 2.7 Added file: http://bugs.python.org/file17822/x.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9134> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com