summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-04-27 18:29:05 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-04-27 18:29:05 +0000
commitbf93d4cc8827842d1e2d40eecc0cc5927a17f3cd (patch)
tree2660399c4ce32265c824154ae4178385e0390378 /regcomp.c
parentf32b5c8a3d480bafef9db5bbadcdd4567494b8f9 (diff)
downloadperl-bf93d4cc8827842d1e2d40eecc0cc5927a17f3cd.tar.gz
fix for failure to match $foo =~ /(?i)/ (from Ilya Zakharevich)
p4raw-id: //depot/perl@5973
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index c0425b766d..7af090e882 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2296,8 +2296,14 @@ tryagain:
nextchar();
ret = reg(1, &flags);
if (ret == NULL) {
- if (flags & TRYAGAIN)
+ if (flags & TRYAGAIN) {
+ if (PL_regcomp_parse == PL_regxend) {
+ /* Make parent create an empty node if needed. */
+ *flagp |= TRYAGAIN;
+ return(NULL);
+ }
goto tryagain;
+ }
return(NULL);
}
*flagp |= flags&(HASWIDTH|SPSTART|SIMPLE);