Variable look-behind-assertions were not available before 5.30.
IMHO it makes no sense to combine a look-behind-assertion with \K.
\K comes handy in cases like
echo fooooobar | perl -pe 's/fo{2,}ba\Kr/z/'
Greetings,
-jo
In reply to Re: Practical use cases for \K in regex
by jo37
in thread Practical use cases for \K in regex
by perlboy_emeritus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |