📅  最后修改于: 2022-03-11 15:04:12.309000             🧑  作者: Mango
const urls = [
'www.abc.au.uk',
'https://github.com',
'http://github.ca',
'https://www.google.ru',
'http://www.google.co.uk',
'www.yandex.com',
'yandex.ru',
'yandex',
'devmaster.auxitaplatform.com',
]
urls.forEach(url => console.log(url.replace(/.+\/\/|www.|\..+/g, '')))