日期:2014-05-18 浏览次数:20819 次
string tempStr = File.ReadAllText(@"C:\Documents and Settings\Administrator\桌面\Test.txt", Encoding.GetEncoding("GB2312"));//读取txt string pattern = @"(?<=/\D*?)\d+(?=.*?\.)"; foreach (Match m in Regex.Matches(tempStr, pattern)) { //循环输出 string value = m.Value;//6720130 }