Regex to parse youtube yid

Posted by novaurora on Stack Overflow See other posts from Stack Overflow or by novaurora
Published on 2010-04-08T01:58:48Z Indexed on 2010/04/08 2:03 UTC
Read the original article Hit count: 466

Filed under:
|
|

Example URLs

http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo
http://www.youtube.com/watch?v=cKZDdG9FTKY&feature=channel
http://www.youtube.com/watch?v=yZ-K7nCVnBI&playnext_from=TL&videos=osPknwzXEas&feature=sub

Any regex that will pull the correct YID from all 3 of these use cases? The first case is especially odd.

Thank you.

© Stack Overflow or respective owner

Related posts about regex

Related posts about php