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=
Do not use regexes for this. URIs have a particular grammar and PHP gives you the tools required to parse each URL properly. See parse_url() and parse_str().