كود PHP:
$string = 'www.web.com/dir_name/t5721.html';
$string = preg_replace("/\www.web.com/\(.*?)/\page.html/i","Your Dir Is : $1", $string);
اتمنى تفيدوني بالخطا اخواني هنا

نظرا لديق خبرتي في الدالة preg_replace
كود PHP:
Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in c:\camel\www\preg.php on line 42