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

s/^$group:.*/$newstring/;
or the clearer
$_ = "$newstring\n" if /^$group:/;

I added ":" to the regex pattern so that you don't accidentally replace the group "sboadmin" (for example).