日期:2014-05-18 浏览次数:20743 次
string[] str = { "aaaaaaA", "bbbbbbB", "cccccMV", "ddddddD", "eeeeMTV", "ffffffF" }; Regex reg = new Regex(@"(?i)[a-z](?<!MV|MTV)$", RegexOptions.RightToLeft); foreach (string s in str) Console.WriteLine(reg.Replace(s, "")); /* aaaaaa bbbbbb cccccMV dddddd eeeeMTV ffffff */