protected function removeRule($rule)
    {
        if (!is_string($this->rules)) {
            return;
        }

        $pattern = "/{$rule}[^\|]?(\||$)/";
        $this->rules = preg_replace($pattern, '', $this->rules, -1);
    }
protected function removeRule($rule)
    {
        if (!is_string($this->rules)) {
            return;
        }

        $pattern = "/{$rule}[^\|]?(\||$)/";
        $this->rules = preg_replace($pattern, '', $this->rules, -1);
    }
protected function removeRule ( $ rule ) { if ( ! is_string ( $ this -> rules ) ) { return ; } $ pattern = "/{$rule}[^\|]?(\||$)/" ; $ this -> rules = preg_replace ( $ pattern , '' , $ this -> rules , - 1 ) ; }
Remove a specific rule by keyword.

@param string $rule

@return void
Remove a specific rule by keyword .