Ver original$text = "www.subdominio.patines24h.com";preg_match('/^www\.(\w+)\.patines24h\.com$/i',$text,$matches);echo $matches[1];