public static string GetYouTubeUserChannelId(this string str) { if (str == null) { return(null); } var match = YouTubeUserChannelIdRegex.Match(str); if (!match.Success || match.Groups["id"].Captures.Count != 1) { return(null); } return(match.Groups["id"].Captures[0].Value); }
public static bool IsValidYouTubeUserChannelUrl(this string str) { return(YouTubeUserChannelIdRegex.IsMatch(str)); }