I need a regexp help, because for me it will take a lot of time , for you some minutes:)
I have youtube a URL :
http://www.youtube.com/watch?v=9_Hd8hXhg7o&feature=youtube_gdata
I can’t add this in embed object , for embed I have to change in this URL :
http://www.youtube.com/v/9_Hd8hXhg7o&hl=en_US&fs=1&
It means, that I want to add the youtube cod in some variable, something like this
var url = after regexp "9_Hd8hXhg7o";
"http://www.youtube.com/v/" + url +"&hl=en_US&fs=1&";
thanks !
This should do it:
This should work on pretty much every format you throw at it. This snippet looks for
?v=or&v=and any characters after that until an&symbol or end of line, so the ID can be found from these also: