how to extract only server names in c#
i want to extrac开发者_开发问答t only server names which is starting from \\
. \\
is removed. After extracting server names this string is parsed. how can i do?
Look at the Uri class.
Uri uri = new Uri(@"\\Myserver\myshare\myfile.txt");
uri.Host == "Myserver"
This is the regex: \\\\.*?\\
精彩评论