正規表現 ファイル名 ディレクトリ
var path1 = "C:/Users/Administrator/Desktop/test/hoge.html";
var path2 = "http://www.sample.com/test/hoge.html";
console.log(path1.match(/^.*\//));
console.log(path1.replace(/^.*\//, ""));
console
["C:/Users/Administrator/Desktop/test/"]
"hoge.html"