From fc4f503762cddab450a2c30bbf5fee3039f92c2e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 14 May 1997 18:27:51 +0000 Subject: [PATCH] Fix showstopping bug (^ wouldn't match after \n). Jeffrey Ollie. --- Modules/regexpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/regexpr.c b/Modules/regexpr.c index 90bff874ab4..87f747fc3eb 100644 --- a/Modules/regexpr.c +++ b/Modules/regexpr.c @@ -1914,7 +1914,7 @@ int re_search(regexp_t bufp, } if (anchor == 1) { /* anchored to begline */ - if (pos > 0 && string[pos - 1]) + if (pos > 0 && (string[pos - 1] != '\n')) continue; } assert(pos >= 0 && pos <= size);