src/Primitive/Support/Str.php
public static function matches($pattern, $string)
    {
        $regexEncoding = mb_regex_encoding();
        mb_regex_encoding(mb_internal_encoding());

        $match = mb_ereg_match($pattern, $string);
        mb_regex_encoding($regexEncoding);

        return $match;
    }
public static function matches($pattern, $string)
    {
        $regexEncoding = mb_regex_encoding();
        mb_regex_encoding(mb_internal_encoding());

        $match = mb_ereg_match($pattern, $string);
        mb_regex_encoding($regexEncoding);

        return $match;
    }
Returns true if $str matches the supplied pattern, false otherwise.

@param  string $pattern Regex pattern to match against

@param         $string  string to match

@return bool Whether or not $str matches the pattern