Пример #1
0
        public static string GetYouTubeCustomChannelId(this string str)
        {
            if (str == null)
            {
                return(null);
            }
            var match = YouTubeCustomChannelIdRegex.Match(str);

            if (!match.Success || match.Groups["id"].Captures.Count != 1)
            {
                return(null);
            }
            return(match.Groups["id"].Captures[0].Value);
        }
Пример #2
0
 public static bool IsValidYouTubeCustomChannelUrl(this string str)
 {
     return(YouTubeCustomChannelIdRegex.IsMatch(str));
 }