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