private function match($pattern, $subject, & $matches)
    {
        $matches = [];
        $subject = (string) $subject;

        if ($this->allowNonAscii || preg_match('/^[\\x00-\\x7F]*$/', $subject)) {
            if (preg_match($pattern, $subject, $match)) {
                $matches = $this->getNamedPatterns($match);

                return true;
            }
        }

        return false;
    }