summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1997-01-16 09:35:34 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-17 08:39:00 +1200
commit85afd4ae870f9ff4e42276c9fef1ecf04ae2c95a (patch)
tree96ed17926551e8a72138168c5530ff530309451d /regcomp.c
parent0f51a74ef561b3bfdfdc523f1a2cb56641806dfd (diff)
downloadperl-85afd4ae870f9ff4e42276c9fef1ecf04ae2c95a.tar.gz
Fix overly picky carping about leading '{' in regex
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 2f3fb40b97..de6104a089 100644
--- 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 '\\':