public function delete(&$name) { if (!valid::group($name)) { $this->error = 'This group does not already exist.'; return false; } if (!$this->exists($name)) { $this->error = 'This group does not already exist.'; return false; } file_put_contents($this->path, preg_replace('/' . $name . ':[^\\r\\n]*[\\r\\n]*/m', '', file_get_contents($this->path))); $this->readfile(); return true; }