I have an expression and need to find characters and operators in that expression to do operations. Is there any functions available?
In the above expression, I need to find the characters A1,B2,C3,D4 and E5 and do operations based on operators available in that expression.
Can you please elaborate the problem.
try by using str functions…
There will be given expression. I need to find the characters and operators and do arithmetic operations based on operators available in that expression.
Ex: (A1+A2+A3)/(A4 * A5).
In the above expression. I need to find A1, A2, A3,A4, A5 and operators available inbetween each operands and do arithmetic operations accordingly.
Could you specify the str functions to do this.
I suggest strreplace()
use this function to remove all unwanted characters.
other wise substr() use this function to get your desired characters
look for the above URL there is plenty of str functions …you can make use of it…
hope it helps