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