src/Gobie/Regex/Wrappers/Pcre/PcreRegex.php
public static function get($pattern, $subject, $flags = 0, $offset = 0)
    {
        static::setUp($pattern);
        \preg_match($pattern, $subject, $matches, $flags, $offset);
        static::tearDown();
        static::handleError($pattern);

        return $matches;
    }
public static function get($pattern, $subject, $flags = 0, $offset = 0)
    {
        static::setUp($pattern);
        \preg_match($pattern, $subject, $matches, $flags, $offset);
        static::tearDown();
        static::handleError($pattern);

        return $matches;
    }
Regular expression match and return first match.

@param string $pattern Pattern
@param string $subject Subject
@param int    $flags   Flags
@param int    $offset  Offset
@return string[] Array with first match that matches given subject, empty array otherwise
@throws PcreRegexException When compilation or runtime error occurs
@link http://php.net/function.preg-match.php