This works perfectly in chrome and firefox, and it SHOULD work perfectly in internet explorer.
In fact, if I manually enter a string instead of taking it from the prompt, it works perfectly. The only issue is when I take in the string using 'prompt', and as far as I can tell the value I'm getting from that is a string, just like any other!
value=prompt("extract","youtube code here");
el=document.getElementById('textarea');
//matches=value.match(/.*<embed src=(^>*)>.*/gi);
item=value.split('<embed src=')[1];
closeTag=item.indexOf('>');
if(closeTag>-1)
{
item=item.substring(0,closeTag);
}
alert(item);
el.value+=item;