I'm using this regex for turning a youtube link into embedded code:
str.replace(/(?:http:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?)?(?:.+)v=(.+)/g, '<iframe width="420" height="345" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>');
But it doesn't work when youtube link has more than the v-parameter, like
http://www.youtube.com/watch?v=iXVe-efsYWw&feature=g-feat
Can anybody help me to change the regex for cutting any additional parameters off?