set hostname to previous name after matchend