Codice PHP:
$dominio 'http://www.google.it:80/page.php?boh=mah&uff=ooof';

$matches = array();

preg_match_all('/(http:\/\/[\w\d]+(\.[\w\d]+)*(:[\d]+)?\/?)/'$dominio$matches); 
la tua risposta sta in $matches[1][0]


ciao!
danno