in reply to Re: Delete a string possibly over two lines
in thread Delete a string possibly over two lines

s/.*\K\{ Name.*\}//s;

I don't understand the purpose of the  .*\K sub-expression in this substitution. Is it perhaps intended as a defensive measure against nested  { ... } groups? I suppose the thing to do is play around with it a bit, but I don't have time ATM. Could you please comment on this?


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: Delete a string possibly over two lines
by tybalt89 (Monsignor) on Feb 06, 2018 at 09:49 UTC

    Yes, it is defense against nested (or only "first half of") expressions.