I have string expression as below
NOT (S:sira1_1810 OR S:sira2_1810 OR S:sira3_1810)
It should be converted as
(NOT S:sira1_1810) OR (NOT S:sira2_1810) OR (NOT S:sira3_1810)
Any ideas much appreciated.
I have string expression as below
NOT (S:sira1_1810 OR S:sira2_1810 OR S:sira3_1810)
It should be converted as
(NOT S:sira1_1810) OR (NOT S:sira2_1810) OR (NOT S:sira3_1810)
Any ideas much appreciated.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Muhammad Imran AnsariPosted Mar 22, 2022, 8:03 PM
Asad AliPosted Mar 24, 2022, 9:13 AM
mesharaasiPosted Mar 23, 2022, 9:12 AM
Thank you.
It's a rule engine we are trying to build. Before that we would need to evaluate the expression in correct format. "S:sira1_1810 " are selected options, If the user doesn't select (NOT) means, we need to trigger a message. If there is no "NOT" beside the option means it is "EQ" (equal). Since we need to execute in "AND","OR" order, we have to evaluate expression in the right format EX:
#1
Expression: NOT S:24zoll_1757 AND C:1757 AND C:1780
Conversion: (NOT S:24zoll_1757) AND (EQ C:1757) AND (EQ C:1780)
#2
Expression: (S:gr1_1778 OR S:gr2_1778 OR S:gr5_1778)
Conversion: ((EQ S:gr1_1778) OR (EQ S:gr2_1778) OR (EQ S:gr5_1778))
#3:
Expression: S:25zoll_1757 AND S:ber7_1756
Conversion: (EQ S:25zoll_1757) AND (EQ S:ber7_1756)
#4:
Expression: S:25zoll_1757 AND NOT S:ber7_1756
Conversion: (EQ S:25zoll_1757) AND (NOT S:ber7_1756)
Asad AliPosted Mar 23, 2022, 8:02 AM
Muhammad Imran AnsariPosted Mar 23, 2022, 3:40 AM
mesharaasiPosted Mar 22, 2022, 8:27 PM