文字列プロパティで抽出やっ
let str = 'www.baidu.com' str.search('baidu') str.replace('www.', '') str.replace('.com', '')