title: Regular expression for YouTube video Id
body: <p>I have the following code which detect the video id from a string.
  It actually catch more cases that I need, and I would like to make it more simply and return the id only for string in this formats:</p>
  
  <pre><code>https://www.youtube.com/watch?v=85PMSYAguZ8
  https://youtu.be/85PMSYAguZ8
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>_getVideoIdFromUrl: function (value) {
  var regEx = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&amp;v=))((\w|-){11})(?:\S+)?$/;
  var matches = value.match(regEx);
  if (matches) {
      return matches[1];
  }
  return false;
  </code></pre>
  
  <p>},</p>
  
  <p>I would need help to change the regEx accordingly, any ideas?</p>
  
  <p>Currently it detects:</p>
  
  <pre><code>YES   'http://www.youtube.com/watch?v=cKZDdG9FTKY&amp;feature=channel',
  YES   'http://www.youtube.com/watch?v=yZ-K7nCVnBI&amp;playnext_from=TL&amp;videos=osPknwzXEas&amp;feature=sub',
  YES   'http://youtu.be/6dwqZw0j_jY',
  YES   'http://www.youtube.com/watch?v=6dwqZw0j_jY&amp;feature=youtu.be',    
  YES   'http://www.youtube.com/watch?v=yZ-K7nCVnBI&amp;playnext_from=TL&amp;videos=osPknwzXEas&amp;feature=sub',
  YES   'http://www.youtube.com/embed/nas1rJpm7wY?rel=0',
  YES   'http://www.youtube.com/watch?v=peFZbP64dsU',
  YES   'http://youtube.com/v/dQw4w9WgXcQ?feature=youtube_gdata_player',
  YES   'http://youtube.com/watch?v=dQw4w9WgXcQ&amp;feature=youtube_gdata_player',
  YES   'http://www.youtube.com/watch?v=dQw4w9WgXcQ&amp;feature=youtube_gdata_player',  
  YES   'http://youtu.be/afa-5HQHiAs',
  YES   'http://youtu.be/dQw4w9WgXcQ?feature=youtube_gdata_player'
  NO    '//www.youtube-nocookie.com/embed/up_lNV-yoK4?rel=0',
  NO    'http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo',
  NO    'http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I',
  NO    'http://www.youtube.com/user/SilkRoadTheatre#p/a/u/2/6dwqZw0j_jY',
  NO    'http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo?rel=0',
  NO    'http://www.youtube.com/watch?v=cKZDdG9FTKY&amp;feature=channel',
  NO    'http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I',
  NO    'http://youtube.com/vi/dQw4w9WgXcQ?feature=youtube_gdata_player',
  NO    'http://youtube.com/?v=dQw4w9WgXcQ&amp;feature=youtube_gdata_player',
  NO    'http://youtube.com/?vi=dQw4w9WgXcQ&amp;feature=youtube_gdata_player',
  NO    'http://youtube.com/watch?vi=dQw4w9WgXcQ&amp;feature=youtube_gdata_player',
  </code></pre>