62,263
社区成员
发帖
与我相关
我的任务
分享string temp = @"count(""xxx"") > 2";
temp = Regex.Replace(temp,@"\w+?\((['""]?)([^'""]+?)\1\)\s*?(.*?)","$2$3");
//xxx > 2
void Main()
{
String str="count(\"xxx\") > 2";
str=Regex.Replace(str,@"[^()]+\(""([^""]+)""\)\s*(\S+)\s*(\S+)","$1$2$3");
Console.WriteLine(str); //xxx>2
}