public function get_regex($key, $pattern, $default = null)
    {
        $filtered = \filter_var(
            $this->get($key),
            FILTER_VALIDATE_REGEXP,
            [
                "options" => [
                    "regexp" => $pattern,
                ],
            ]
        );

        if ($filtered === false) {
            return $default;
        }

        return $filtered;
    }