I need to validate a youtube video URL with javascript/jquery that works for all types of youtube video url's including the shortened youtu.be version. There are a wealth of examples on how to do this regex but they all fail to include the shortened version. Any ideas?
-
may be it is dub stackoverflow.com/questions/5288941/…Anton Baksheiev– Anton Baksheiev2012-09-22 10:21:44 +00:00Commented Sep 22, 2012 at 10:21
-
maybe you didn't read my question and compare it to your link.Pollux Khafra– Pollux Khafra2012-09-22 10:23:27 +00:00Commented Sep 22, 2012 at 10:23
Add a comment
|
1 Answer
The only supported way of validating YouTube watch page URLs (including youtu.be URLs) is using oEmbed: http://apiblog.youtube.com/2009/10/oembed-support.html