diff options
author | Karl Williamson <khw@cpan.org> | 2022-07-07 11:44:01 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-07-08 21:07:45 -0600 |
commit | 60c3737a8ae6b878a89eaa470cda07c95d83fe9c (patch) | |
tree | 1d4cb72a700397a564e0ddff71660ba7fd527d16 /regcomp.c | |
parent | bd0937af8d2a566a55a27601c9b12f4baee3a7a3 (diff) | |
download | perl-60c3737a8ae6b878a89eaa470cda07c95d83fe9c.tar.gz |
qr/\K*/ now works without hanging; rmv check
This removes the diagnostic that was put into place to forbid saying
\K*, and similar, as the code now handles the case reasonably.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 22 |
1 files changed, 6 insertions, 16 deletions
@@ -13237,22 +13237,12 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) * Check and possibly adjust a zero width operand */ if (! (flags & (HASWIDTH|POSTPONED))) { if (max > REG_INFTY/3) { - if (origparse[0] == '\\' && origparse[1] == 'K') { - vFAIL2utf8f( - "%" UTF8f " is forbidden - matches null string" - " many times", - UTF8fARG(UTF, (RExC_parse >= origparse - ? RExC_parse - origparse - : 0), - origparse)); - } else { - ckWARN2reg(RExC_parse, - "%" UTF8f " matches null string many times", - UTF8fARG(UTF, (RExC_parse >= origparse - ? RExC_parse - origparse - : 0), - origparse)); - } + ckWARN2reg(RExC_parse, + "%" UTF8f " matches null string many times", + UTF8fARG(UTF, (RExC_parse >= origparse + ? RExC_parse - origparse + : 0), + origparse)); } /* There's no point in trying to match something 0 length more than |