日期:2014-05-17 浏览次数:20395 次
StreamReader reader = new StreamReader("c:\\1.txt"); string source = reader.ReadToEnd(); Regex reg = new Regex(@"(?is)[\u4e00-\u9fa5].*?.jc"); MatchCollection mc = reg.Matches(source); foreach (Match m in mc) { MessageBox.Show(m.Value); } }
------解决方案--------------------
string str = "http://www.abc.com/course.ashx/第91课时.输入滤波时间调整指令REFF.jc"; Regex reg = new Regex(@"[^/]+$"); Console.WriteLine(reg.Match(str).Value);