using System; using System.Text.RegularExpressions; public class Test { public static bool DoTest(string sProp) { Regex re = new Regex(@"~\([A-Z0-1]\)|[&|>=]\([A-Z0-1],[A-Z0-1]\)"); while(re.Match(sProp).Success) { sProp = re.Replace(sProp, "1"); } return sProp=="1"; } public static void Main() { string[] saPropositions = { "&(&(=(A,B),>(&(A,B),~(C))),>(A,~(&(A,B))))", "=(~(A),>(>(B,C),~(A)))", "(~(A))", ">(A,B" }; for( int idx = 0; idx