src/Utils.php
public static function thumbnailToId(string $thumbnailUrl): string
    {
        if (1 !== \preg_match('/\/([\d]+)\/([\d]+)(\-avatar\.jpg)$/', $thumbnailUrl, $match)) {
            throw new \RuntimeException(\vsprintf('Invalid thumbnail URL "%s"', [
                $thumbnailUrl,
            ]));
        }

        return ltrim($match[1].$match[2], '0');
    }
public static function thumbnailToId(string $thumbnailUrl): string
    {
        if (1 !== \preg_match('/\/([\d]+)\/([\d]+)(\-avatar\.jpg)$/', $thumbnailUrl, $match)) {
            throw new \RuntimeException(\vsprintf('Invalid thumbnail URL "%s"', [
                $thumbnailUrl,
            ]));
        }

        return ltrim($match[1].$match[2], '0');
    }
Returns a character's unique ID from a thumbnail URL.

@param string $thumbnailUrl

@return string