Finding characters and operators in an expression

Hi All,

I have an expression and need to find characters and operators in that expression to do operations. Is there any functions available?

Example: (A1+B2+C3)/(D4-E5)

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.

Regards,

Kuppusamy S

Hi,

Can you please elaborate the problem.

try by using str functions…

Hi Vishal,

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.

Regards,

Kuppusamy S

Hi Kranthi,

Could you specify the str functions to do this.

Regards,

Kuppusamy S

I suggest strreplace()

use this function to remove all unwanted characters.

other wise substr() use this function to get your desired characters

http://www.axaptapedia.com/Category:String

look for the above URL there is plenty of str functions …you can make use of it…

hope it helps