标签:c# val div pat regex har text 获取 ring
string strFileName = Server.MapPath("~/00125ca6293e6109161b6fa91d03473a.mp3"); string dirName = System.IO.Path.GetDirectoryName(strFileName); string SongName = System.IO.Path.GetFileName(strFileName);//获得歌曲名称 FileInfo fInfo = new FileInfo(strFileName); ShellClass sh = new ShellClass(); Folder dir = sh.NameSpace(dirName); FolderItem item = dir.ParseName(SongName); string timeStr = dir.GetDetailsOf(item, -1); Label1.Text = Regex.Match(timeStr, "\\d:\\d{2}:\\d{2}").Value;//获取歌曲时间 Label2.Text = timeStr;
标签:c# val div pat regex har text 获取 ring
原文地址:http://www.cnblogs.com/xsj1989/p/6323169.html