public static function getStringElements($string, $separator)
    {
        $matches = [];
        $pattern = sprintf('|[^\%s]+|', $separator);
        $matchCount = preg_match_all($pattern, $string, $matches);

        if ($matchCount > 1) {
            return $matches[0];
        }

        return [];
    }