Say I have a list of IDs like so:
http://www.youtube.com/watch?v=KMU0tzLwhbE http://youtu.be/KMU0tzLwhbE http://www.youtube.com/watch?v=KMU0tzLwhbE&featured=
The first group of a preg_match using (?:(?:\?|&)v=|youtu\.be\/)(.+?)(?:$|&) as the pattern.
preg_match
(?:(?:\?|&)v=|youtu\.be\/)(.+?)(?:$|&)