$str = "http://fdaf/fdasf/fasdkfas.fdsaf/update/dfasfds.jpg";
$str = preg_replace('/http:\/\/.*\/(update\/.*)/',"\\1",$str);
echo "$str";