📜  js 从 url 获取路径 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:42.629000             🧑  作者: Mango

代码示例3
var reg = /.+?\:\/\/.+?(\/.+?)(?:#|\?|$)/;
var pathname = reg.exec( 'http://www.somedomain.com/account/search?filter=a#top' )[1];