Esempio n. 1
0
        public static string GetFacebookVideoId(this string str)
        {
            if (str == null)
            {
                return(null);
            }
            var match = FacebookVideoIdRegex.Match(str);

            if (!match.Success || match.Groups[1].Captures.Count != 1)
            {
                return(null);
            }
            return(match.Groups[1].Captures[0].Value);
        }
Esempio n. 2
0
        // Extension methods

        public static bool IsValidFacebookVideoUrl(this string str)
        {
            return(FacebookVideoIdRegex.IsMatch(str));
        }