Innermost bracket HowTo?

WebJumper

Well-known member
Joined
Jul 8, 2003
Messages
126
Location
Germany
Hello,

I get a formula string from user like following:
IF(((L[0]Z[60-62]==7) AND (L[1]Z[60-62]==7))OR(L[-0]Z[60-62]!=70))THEN(L[-0]Z[60-62])ELSE(L[-1]Z[60-62])

This string comes from a XML config file which is tolding my converter on which positions it have to read in a ASCII file.

So, L[0]Z[60-62] means, read in line 0 (L[0]) the chars 60 till 62 (Z[60-62]).
Getting the values is no prob using Regex.
But now I have to regard the innermost bracket:
((L[0]Z[60-62]==7) AND (L[1]Z[60-62]==7))

But how to go into the innermost bracket? I mean, from where do I know that this is the innermost bracket?

Any easy ways? Any algorythmus that will do this?

Converting the pseudo code to real C# code is no prob...

Thanks for any good ideas!

-Stefan
 
Back
Top