RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 8 regular expressions found.

   Displaying page 1 of 1 pages; Items 1 to 8
Title Test Details Embedded YouTube Video
Expression
(\"http:\/\/www\.youtube\.com\/v\/\w{11}\&rel\=1\")
Description
A simple regex to validate an embedded YouTube video.
Matches
a valid embedded YouTube video
Non-Matches
anything else
Author Rating: The rating for this expression. tedcambron
Title Test Details YouTube Link
Expression
^http://\w{0,3}.?youtube+\.\w{2,3}/watch\?v=[\w-]{11}
Description
Validates a YouTube Link
Matches
http://youtube.com/watch?v=94opF-9PJ2I | http://www.youtube.com/watch?v=94opF-9PJ2I | http://www.youtube.com/watch?v=Iu4gxId0okA&feature=channel | http://www.youtube.com/watch?v=1D2HEM1cyuw&feature=related | http://es.youtube.com/watch?v=1D2HEM1cyuw&feature=related
Non-Matches
http://tube.com/watch?v=94opF-9PJ2I | http://www.youtube.com/watch?v=94PJ2I | http://www.youtube.com/wh?v=Iu4gxId0okA&feature=channel | http://www.youtube.watch?v=1D2HEM1cyuw&feature=related | http://espanol.youtube.com/watch?v=1D2HEM1cyuw&feature=related
Author Rating: Not yet rated. Rodrigo Iloro
Title Test Details YouTube Video ID Extraction
Expression
http://www\.youtube\.com.*v=(?'VideoID'[^&]*)
Description
This will match a youtube url and pull the video id out into a named capture group called VideoID. It is intentionally loose on the length and content of the video id so that it doesn't break in the future if YouTube change the format.
Matches
http://www.youtube.com/watch?gl=GB&feature=topvideos&hl=en-GB&v=tin6gKecb8k | http://www.youtube.com/watch?gl=GB&feature=topvideos&v=tin6gKecb8k&hl=en-GB | http://www.youtube.com/watch?v=tin6gKecb8k
Non-Matches
http://www.youtube.com/ | http://www.othersite.com/ | http://www.youtube.com/watch?gl=GB
Author Rating: Not yet rated. Matthew Harris
Title Test Details Extract YouTube ID
Expression
(?:[Yy][Oo][Uu][Tt][Uu][Bb][Ee]\.[Cc][Oo][Mm]/watch\?v=)([\w-]{11})
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
Matches
http://www.youtube.com/watch?v=pW2GSdxxwDg | http://www.youtube.com/watch?v=-7P7_kxZQ5I | http://www.youtube.com/watch?v=7sPKHwsupmQ&playnext=1&list=PL40CB7986D1A9A285 | http://www.youtube.com/watch?v=r-di4gJvq4Q&feature=channel_video_title
Non-Matches
http://www.youtu.be/watch?v=pW2GSdxxwDg
Author Rating: The rating for this expression. Charlie Seitz
Title Test Details Extract Youtube Video ID
Expression
(?:youtu\.be\/|youtube.com\/(?:watch\?.*\bv=|embed\/|v\/)|ytimg\.com\/vi\/)(.+?)(?:[^-a-zA-Z0-9]|$)
Description
This regex should recognize a Youtube video ID from any Youtube URL, embed snippet, or preview image.
Matches
http://www.youtube.com/watch?v=QH2-TGUlwu4 | http://youtu.be/QH2-TGUlwu4 | http://www.youtube.com/embed/QH2-TGUlwu4 | http://www.youtube.com/v/QH2-TGUlwu4?version=3&hl=en_US | http://i4.ytimg.com/vi/QH2-TGUlwu4/default.jpg
Non-Matches
asdf
Author Rating: Not yet rated. Robert Rothermel
Title Test Details Youtube video id from url
Expression
^(http(s?):\/\/)?(www\.)?youtu(be)?\.([a-z])+\/(watch(.*?)(\?|\&)v=)?(.*?)(&(.)*)?$
Description
also matches youtu.be/video_id, the video id is at $9
Matches
http://www.youtube.com/watch?v=lK-zaWCp-co&feature=g-all-u&context=G27a8a4aFAAAAAAAAAAA | http://youtu.be/AXaoi6dz59A | youtube.com/watch?gl=NL&hl=nl&feature=g-vrec&context=G2584313RVAAAAAAAABA&v=35LqQPKylEA | https://youtube.com/watch?gl=NL&hl=nl&feature=g-vrec&context=G2584313RVAAAAAAAABA&v=35LqQPKylEA
Non-Matches
http://www.mytube.com/watch?v=35LqQPKylEA | http://www.youtube.com/watch?b=35LqQPKylEA | www.youtube.com
Author Rating: The rating for this expression. Owen Hardy
Title Test Details Valid YouTube links
Expression
(http://)?(www\.)?(youtube|yimg|youtu)\.([A-Za-z]{2,4}|[A-Za-z]{2}\.[A-Za-z]{2})/(watch\?v=)?[A-Za-z0-9\-_]{6,12}(&[A-Za-z0-9\-_]{1,}=[A-Za-z0-9\-_]{1,})*
Description
Matches only valid YouTube links. This includes directly linked videos (yimg) and using YouTube's shortening service (youtu.be). Also supports local domains, like youtube.nl, youtube.de, youtube.co.uk, etc.
Matches
www.youtube.co.uk/watch?v=KUlv7qraZaM | http://www.yimg.com/watch?v=KUlv7qraZaM | http://www.youtube.com/watch?v=apxKFXJ8jSg&feature=relmfu | youtu.be/apxKFXJ8jSg
Non-Matches
youtube.com/watch/v=apxKFXJ8jSg
Author Rating: Not yet rated. Pim Stoit
Title Test Details YouTube Video Link Verifier + ID puller
Expression
(?:[hH][tT]{2}[pP][sS]{0,1}:\/\/)?[wW]{0,3}\.{0,1}[yY][oO][uU][tT][uU](?:\.[bB][eE]|[bB][eE]\.[cC][oO][mM])?\/(?:(?:[wW][aA][tT][cC][hH])?(?:\/)?\?(?:.*)?[vV]=([a-zA-Z0-9--]+).*|([A-Za-z0-9--]+))
Description
Verifies YouTube video links AND pulls the video ID from them in a matching group. Works with all capitalizations. It also matches the WHOLE link but sorts the video ID into a group. Works with JavaScript, PHP and Python. (Not tested with any other Regex engine) WARNING: youtu.be links have their ID group as the second group.
Matches
http://www.youtube.com/watch?v=something | https://www.youtube.com/watch?v=something | http://youtu.BE/something | https://www.YOUTUBE.com/watch?en=gb&vari=abc&v=something&another=yes
Non-Matches
http://www.anothersite.com/watch?v=something | http://www.youtube.com/wat?v=something
Author Rating: The rating for this expression. Billy Venner
   Displaying page 1 of 1 pages; Items 1 to 8

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials