How to pull the server name from a UNC

前端 未结 5 979
借酒劲吻你
借酒劲吻你 2021-02-05 16:34

Would anyone be able to tell me how to pull the server name out of a UNC?

ex.

//servername/directory/directory

Edit : I apologize but it looks like I nee

5条回答
  •  耶瑟儿~
    2021-02-05 17:06

    This should do the trick.

    ^//([^/]+).*
    

    The server name is in the first capturing group

提交回复
热议问题