How would you go about embedding youtube vidoes automatically from the URI. Say for example you type in a textbox:
The quick brown fox jumped over this video http://www.youtube.com/watch?v=5qm8PH4xAss&feature=player_embedded and then fell into this http://www.youtube.com/watch?v=lSCSmpV8Nn8&feature=hp_SLN&list=SL
You press submit and the results are displayed back to you. In place of the youtube links you have the actual flash files.
(In php naturally, or any language).
I know you could use Regex (preg_replace .etc), however how would you remove the extra queries that youtube provides (i.e. &feature=blah), and turn everything into something like: http://www.youtube.com/v/5qm8PH4xAss, ready to be placed into an object to embed.
Sorry for the long question,.. I hope you understand it. :)