$text = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
labore et dolore magna aliquyam erat, sed diam voluptua.
http://youtube.com/watch?v=94opF-9PJ2I
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
labore et dolore magna aliquyam erat, sed diam voluptua.';
$pattern = '(http://\w{0,3}.?youtube+\.\w{2,3}/watch\?v=[\w-]{11})';
$replace = '<object width="560" height="340"><param name="movie" value="$0&hl=de&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="$0&hl=de&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>';
$newText = preg_replace($pattern, $replace, $text);
print $newText;