日期:2014-05-17 浏览次数:21020 次
    Console.WriteLine(Regex.Replace("p22/(p30a+p30b+p30c)", @"[+\-*/()]+", ",").Substring(0, Regex.Replace("p22/(p30a+p30b+p30c)", @"[+\-*\/()]+", ",").Length-1));
            Console.WriteLine(Regex.Replace("(p22/(p30a)+p30b+p30c)", @"[+\-*/()]+", (Match) => { if (Match.Value == ")" 
------解决方案--------------------
 Match.Value == "(") { return ""; } else { return ","; } }));      
            Console.WriteLine(String.Join(",", Regex.Split("p22/(p30a+p30b+p30c)", @"[+\-*/()]+").Except((IEnumerable<string>)new string[] { "" })));