PHP код:
<?php
$array = array (
'http://www.jimyaghi.com/ppew/seo-nmment-page-1#comment-2046',
'http://landrules.com/2009/04/12/ge-1/#comment-2733/',
'http://beachbumphotography.net/',
'http://endlessyears.com/',
'4ewgdvdfgb'
);
foreach($array as $val)
{
if(strstr($val,'http://'))
{
$val = preg_replace('/(http:\/\/[^\/]+).+$/', '$1/', $val);
$r .= $val."\n";
}
}
echo $r;
?>