in reply to Re^2: Search patern within pattern in a single substitute command
in thread Search patern within pattern in a single substitute command
What does the \K mean?
from Perldoc perlre: "Character Classes and other Special Escapes"
\K Keep the stuff left of the \K, don't include it in $&
It says that the bit of the regex preceding it is only used to locate the part of the string to be replaced, but isn't a part of the substitution. It just saves the need for an extra capture.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Search patern within pattern in a single substitute command
by shobhit (Sexton) on Mar 04, 2011 at 05:40 UTC |