正規表現で最後のスラッシュまでを取得 リンクを取得 Facebook × Pinterest メール 他のアプリ 10月 20, 2017 正規表現でURL等の最後のスラッシュまでを取得 var urlSrc = 'http://example.com/hoge/fuga/index.html'; var urlPth = urlSrc.match(/.+\//); // ← http://example.com/hoge/fuga/ Read more »