src/Util/Strings.php
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;
    }
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;
    }
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 ; }
Performs a regular expression match.

@param  string $subject
@param  string $pattern
@param  int    $flags  can be PREG_OFFSET_CAPTURE (returned in bytes)
@param  int    $offset offset in bytes

@return array|null
@throws RegexpException
Performs a regular expression match .