这是一个用于该页面的正则表达式。
\.\w+(?=</a></li>)
雷伊
PHP
$content = file_get_contents('http://www.uniteddomains.com/index/footer/');
preg_match_all('/\.\w+(?=<\/a><\/li>)/m', $content, $matches);
print_r($matches);
PHPFiddle
结果如下:
.africa、.amsterdam、.bcn、.berlin、.boston、.brussels、.budapest、.gent、.hamburg、.koeln、.london、.madrid、.melbourne、.moscow、.miami、.nagoya、.nyc , .okinawa, .osaka, .paris, .quebec, .roma, .ryukyu, .stockholm, .sydney, .tokyo, .vegas, .wien, .yokohama, .africa, .arab, .bayern, .bzh, . cymru、.kiwi、.lat、.scot、.vlaanderen、.wales、.app、.blog、.chat、.cloud、.digital、.email、.mobile、.online、.site、.mls、.secure、 .web、.wiki、.associates、.business、.car、.careers、.contractors、.clothing、.design、.equipment、.estate、.gallery、.graphics、.hotel、.immo、.investments、.law , .management, .media, .money, .solutions, .sucks, .taxi, .trade, .archi, .adult, .bio, .center, .city, .club, .cool, .date, .earth, .能量,.family,.free,.green,.live,.lol,.爱,.med,.ngo,.news,.phone,.pictures,.radio,.reviews,.rip,.team,.technology,.today,.voting,.buy,.deal,.luxe,.sale, .shop、.shopping、.store、.eus、.gay、.eco、.hiv、.irish、.one、.pics、.porn、.sex、.singles、.vin、.vip、.bar、.pizza , .wine, .bike, .book, .holiday, .horse, .film, .music, .party, .email, .pets, .play, .rocks, .rugby, .ski, .sport, .surf, .旅游,.video旅游,.video旅游,.video