Description |
.NET 3.5 Tested. Used to extract the YouTubeID from a fully qualified YouTube URL.
Dim _Regex As New Regex("(?:[Yy][Oo][Uu][Tt][Uu][Bb][Ee]\.[Cc][Oo][Mm]/watch\?v=)([\w-]{11})", RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Dim _RegexMatch As Match = _Regex.Match("http://www.youtube.com/watch?v=pW2GSdxxwDg")
Dim _YouTubeVideoID As System.String = _RegexMatch.Groups(1).Value
|