in reply to How do I escape a :: in s///?
You only asked it to replace "sbo", not the whole line. I think you want
or the clearers/^$group:.*/$newstring/;
$_ = "$newstring\n" if /^$group:/;
I added ":" to the regex pattern so that you don't accidentally replace the group "sboadmin" (for example).
|
|---|