I have a complex expression consisting of LHS, operators, RHS. In the expression, I need to place an input box in place of each RHS and append the value inside it.
So, I thought of finding the position of all the operators in the expression, and place an input box next to it. Her's an Example:
I have a string var a = "(temp >= 10) && (humid >= 20) "
wherein, I need to find each position(index) of >=
in the string expression.
I tried comparing single characters, but that is not helping me. How do I need to do this using Javascript or Jquery?