正規表現

正規表現

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