From 65d4bc616aa94f391951e2b9c699765531a27e3f Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Tue, 3 Oct 2000 16:29:23 +0000 Subject: [PATCH] Fixed negative lookahead/lookbehind. Closes bug #115618. --- Lib/test/re_tests.py | 2 ++ Modules/_sre.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Lib/test/re_tests.py b/Lib/test/re_tests.py index 3a25d511afe..bb72f3d5445 100755 --- a/Lib/test/re_tests.py +++ b/Lib/test/re_tests.py @@ -615,4 +615,6 @@ # bug 112468 ('(', '', SYNTAX_ERROR), ('[\\41]', '!', SUCCEED, 'found', '!'), + # bug 115618 + (r'(? 0 && state->ptr != ptr) - return SRE_ERROR_STATE; pattern += pattern[0]; break; @@ -791,8 +790,6 @@ SRE_MATCH(SRE_STATE* state, SRE_CODE* pattern, int level) return i; if (i) return 0; - if (pattern[1] > 0 && state->ptr != ptr) - return SRE_ERROR_STATE; pattern += pattern[0]; break;