📅  最后修改于: 2022-03-11 15:02:56.527000             🧑  作者: Mango
var reg = /.+?\:\/\/.+?(\/.+?)(?:#|\?|$)/;
var pathname = reg.exec( 'http://www.somedomain.com/account/search?filter=a#top' )[1];