日期:2014-05-17 浏览次数:20873 次
string str = "BTFTL_5322_18.C9.11.27.10.49.dat";
string newStr = Regex.Replace(Regex.Match(str, @"\d.*\d").ToString(), @"_
------解决方案--------------------
\.","");
Console.WriteLine(newStr);
string str = "B_F_MR_5322_18.C9.11.07.03.40.dat";
str = Regex.Replace(str, @"(?is)[a-z]+_
------解决方案--------------------
\.(dat)?
------解决方案--------------------
(?<=\d)_", "");