This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Bug in Regular Expressions when using colon as delimiter
[perl5.git] / regcomp.c
index 0e9846c..3e30253 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -467,6 +467,9 @@ I32 *flagp;
                nextchar();
                *flagp = TRYAGAIN;
                return NULL;
+            case 0:
+                croak("Sequence (? incomplete");
+                break;
            default:
                --regparse;
                while (*regparse && strchr("iogcmsx", *regparse))