Exemplo n.º 1
0
        public static string GetYouTubePlaylistId(this string str)
        {
            if (str == null)
            {
                return(null);
            }
            var match = YouTubePlaylistIdRegex.Match(str);

            if (!match.Success || match.Groups["id"].Captures.Count != 1)
            {
                return(null);
            }
            return(match.Groups["id"].Captures[0].Value);
        }
Exemplo n.º 2
0
 public static bool IsValidYouTubePlaylistUrl(this string str)
 {
     return(YouTubePlaylistIdRegex.IsMatch(str));
 }