Performs match of specified pattern against $subject.

@param  string $subject The subject, on which to perform matches.
@throws RegexpException
@return boolean Whether or not pattern matches subject string passed.
350823
public function matches($subject)
    {
        if ($this->pattern === null) {
            throw new RegexpException("No pattern specified for regexp match().");
        }

        return $this->engine->match($this->pattern, $subject, $this->groups);
    }
100636
public function match($subject)
    {
        $this->subject = $subject;

        $suffixLength = strlen($this->suffix);
        if (!$suffixLength) {
            return true;
        }

        return (substr($subject, -$suffixLength) === $this->suffix);
    }
470266
public static function match(string $subject, string $pattern, int $flags = 0, int $offset = 0)
    {
        if ($offset > \strlen($subject)) {
            return null;
        }

        $m = null;

        return static::pcre('\preg_match', [$pattern, $subject, &$m, $flags, $offset])
            ? $m
            : null;
    }
261014
public static int preg_match(Pattern pattern, String subject) {
        int matches=0;
        Matcher m = pattern.matcher(subject);
        while(m.find()){ 
            ++matches;
        }
        return matches;
    }
1061438
public function subject($subject)
    {
        try {
            $this->mailer->Subject = $subject;
        } catch (phpmailerException $e) {
            throw new EmailException($e->getMessage(), $e->getCode());
        }

        return $this;
    }
905379
public function subject($subject = null)
    {
        if ($subject !== null) {
            $this->_subject = $subject;

            return $this;
        }

        return $this->_subject;
    }
311111
public function validate($subject): bool
    {
        if (\is_array($this->schema['patternProperties'])) {
            foreach ($this->schema['patternProperties'] as $pattern => $patternSchema) {
                foreach ($subject as $propertyName => $propertyData) {
                    if (\preg_match(sprintf('/%s/', $pattern), $propertyName)) {
                        $nodeValidator = new NodeValidator($patternSchema, $this->rootSchema);
                        if (!$nodeValidator->validate($propertyData)) {
                            return false;
                        }
                    }
                }
            }
        }
        return true;
    }
333463
public static function strIs($patterns, $subject, &$matchedPattern = '', $caseSensitive = false)
    {
        if (!is_array($patterns)) {
            $patterns = (array) $patterns;
        }

        $lowerSubject = strtolower($subject);

        foreach ($patterns as $pattern) {

            if ($caseSensitive) {
                if (str_is($pattern, $subject)) {
                    $matchedPattern = $pattern;
                    return true;
                }
            } else {
                $lowerPattern = strtolower($pattern);
                if (str_is($lowerPattern, $lowerSubject)) {
                    $matchedPattern = $pattern;
                    return true;
                }
            }

        }

        return false;
    }
462194
public function isSatisfiedBy($subject)
    {
        return $this->spec1->isSatisfiedBy($subject)
            && $this->spec2->isSatisfiedBy($subject);
    }
116123
public function match($subject, $seed = '')
	{
		if (!empty($seed))
		{
			$this->addSeed($seed);
		}

		return preg_match($this->compile(), $subject);
	}
299181
public function pregReplaceLast(string $regExp, string $subject)
    {
        if (!$regExp) {
            return $subject;
        }

        $strDelimiter = $regExp[0];
        $regExp = rtrim(ltrim($regExp, $strDelimiter), $strDelimiter);

        return preg_replace("$strDelimiter$regExp(?!.*$regExp)$strDelimiter", '', $subject);
    }
985103
public function getMatches($subject)
    {
        preg_match('/'.$this->pattern.'/',$subject,$matches);
        return count($matches) ? $matches : false;
    }
192483
public function subject($subject) {

		if(false === is_string($subject)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($subject)), E_USER_ERROR);
		}

		$this -> subject = $subject;

		return $this;
	}
1204369
public function subject($subject)
	{
		if ($this->config['encode_headers'])
		{
			$subject = $this->encode_mimeheader((string) $subject);
		}
		$this->subject = (string) $subject;

		return $this;
	}
199084
public function decrypt($subject)
    {

        if ($this->key->getType() == CryptoKey::TYPE_SYMMETRIC) {
            // Symmetric? This is easy...
            return parent::decrypt($subject);
        }

        $splitSubject = explode('|', $subject);
        if (sizeof($splitSubject) != 2) {
            throw new Exception('Not a valid ciphertext for CryptoPackage, try the Crypto class');
        }

        $this->action = self::ACTION_DECRYPT;
        $this->subject = base64_decode($splitSubject[0]);
        $this->secondSubject = base64_decode($splitSubject[1]);

        return $this;
    }
1356229
public function replace($subject)
    {
        if ($this->pattern === null || $this->replace === null) {
            throw new RegexpException("Missing pattern or replacement string regexp replace().");
        }

        return $this->engine->replace($this->pattern, $this->replace, $subject);
    }
293733
public static function for($pattern, $replacement, $subject, $limit)
    {
        try {
            list($result, $count) = is_callable($replacement) ?
                static::doReplacementWithCallable($pattern, $replacement, $subject, $limit) :
                static::doReplacement($pattern, $replacement, $subject, $limit);
        } catch (Exception $exception) {
            throw RegexFailed::replace($pattern, $subject, $exception->getMessage());
        }

        if ($result === null) {
            throw RegexFailed::replace($pattern, $subject, static::lastPregError());
        }

        return new static($pattern, $replacement, $subject, $result, $count);
    }