in reply to Re: Non-greedy substitution
in thread Non-greedy substitution

Am I right the \K is Keeping everything upto that point and not substituting that part?
It is everything to the left and not just the 'thing' immediately before /K?

Replies are listed 'Best First'.
Re^3: Non-greedy substitution
by Corion (Patriarch) on Nov 15, 2024 at 21:53 UTC

    If you're interested in seeing how the Regex engine steps through a string, you can load Regexp::Debugger. Alternatively, the first edition of Mastering Regular Expressions explains in-depth how Perls RE engine matches and compares that to other engines.