Código PHP:
$a = "/<object style=\"height: 390px; width: 640px\">
<param name=\"movie\" value=\"http://www.youtube.com/v/$1?version=3\">
<param name=\"allowFullScreen\" value=\"true\">
<param name=\"allowScriptAccess\" value=\"always\">
<embed src=\"http://www.youtube.com/v/$1?version=3\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"640\" height=\"390\"></object>/is";
$b = "[youtube]$1[/youtube]";
preg_replace($a, $b, $texto)
print $texto;
Ahí está, disculpame.