This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(??{ }) anomaly
[perl5.git] / regcomp.c
index 2283d10..7850492 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2168,6 +2168,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp)
                /* FALL THROUGH*/
            case '?':           /* (??...) */
                logical = 1;
+               if (*RExC_parse != '{')
+                   goto unknown;
                paren = *RExC_parse++;
                /* FALL THROUGH */
            case '{':           /* (?{...}) */