At the moment I'm using this regex to extract the video id from a Youtube URL:
url.match(/v=([^&]*)/)[1]
How can I alter this so that it will also get the video id from this Youtube URL, which has no v parameter:
http://www.youtube.com/user/SHAYTARDS#p/u/9/Xc81AajGUMU
Thanks for reading.
EDIT: I'm using ruby 1.8.7
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…