title: Trouble with matching domain at the front and getting video id
body: <p>I am trying to modify the following regex to enforce that the domain is either <code>youtube</code> or <code>youtu.be</code>. This original regex is meant to provide in the 2nd group the id of the video for watching.<br>
  E.g. <code>lVIGhYMwRgs</code></p>
  
  <p><strong>my current test list</strong></p>
  
  <pre><code>http://www.youtube.com/watch?v=lVIGhYMwRgs&amp;feature=feedrec_grec_index
  http://www.youtube.com/v/lVIGhYMwRgs?fs=1&amp;amp;hl=en_US&amp;amp;rel=0
  http://www.youtube.com/watch?v=lVIGhYMwRgs#t=0m10s
  http://www.youtube.com/embed/lVIGhYMwRgs?rel=0
  http://www.youtube.com/watch?v=lVIGhYMwRgs
  http://youtu.be/lVIGhYMwRgs
  http://www.example.com/media/embed/83295164
  </code></pre>
  
  <p><strong>First Regex</strong></p>
  
  <pre><code>(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&amp;v=)([^#\&amp;\?]*)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/9dprM.png" alt="enter image description here"></p>
  
  <p>The problem is that <code>example.com</code> matches!</p>
  
  <p>So I tried modifying the regex to the following to ensure either <code>youtube</code> or <code>youtu.be</code> are in the url:</p>
  
  <pre><code>((youtu.be\/)|(youtube.com\/))(v\/|u\/\w\/|embed\/|watch\?v=|\&amp;v=)([^#\&amp;\?]*)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/auipV.png" alt="enter image description here">
  While this solves my <code>example.com</code> problem, it does not match the <code>youtu.be</code> url. </p>
  
  <p>I have also tried this regex because I think my problem is that <code>youtu.be</code> only has a slash and then directly after, the id.</p>
  
  <pre><code>(youtube.com\/)(youtu.be|v\/|u\/\w\/|embed\/|watch\?v=|\&amp;v=)([^#\&amp;\?]*)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/gr4DZ.png" alt="enter image description here"></p>
  
  <p>and then i tried this which works for <code>youtu.be</code> and not much else.</p>
  
  <pre><code>((youtube.com\/)|(v\/|u\/\w\/|embed\/|watch\?v=|\&amp;v=)|(youtu.be\/))([^#\&amp;\?]*)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/K2rmq.png" alt="enter image description here"></p>
  
  <p>How can i fix my modification?</p>