示例网址
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
http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I
任何可以从所有 4 个用例中提取正确 YID 的正则表达式?第一种情况特别奇怪.
Any regex that will pull the correct YID from all 4 of these use cases? The first case is especially odd.
谢谢.
(?<=v=)[a-zA-Z0-9-_]+(?=&)|(?<=[0-9]/)[^&
]+|(?<=v=)[^&
]+
这有效.http://i.imgur.com/SQJW2.jpg
这篇关于正则表达式解析 youtube yid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!