Umarım doğru anlamışımdır;

Alıntı
$str = 'http://img196.imageshack.us/img196/7449/playery.swf';

$result = preg_replace('/.*\/(.*)$/s', 'http://site.com/js/$1', $str);

echo $result;