Fix overly picky carping about leading '{' in regex
Chip Salzenberg [Wed, 15 Jan 1997 21:35:34 +0000 (09:35 +1200)]
regcomp.c

index 2f3fb40..de6104a 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -764,10 +764,15 @@ tryagain:
        croak("internal urp in regexp at /%s/", regparse);
                                /* Supposed to be caught earlier. */
        break;
+    case '{':
+       if (!regcurly(regparse)) {
+           regparse++;
+           goto defchar;
+       }
+       /* FALL THROUGH */
     case '?':
     case '+':
     case '*':
-    case '{':
        FAIL("?+*{} follows nothing in regexp");
        break;
     case '\\':