javascript 获取链接文件地址中第一个斜线内的正则表达式

  window.location.pathname

  比如:

  /windows/location/page.html

  我想得到“windows”,请问用正则表达式怎么写?

  

   [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]