BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read and extract the values between 2 brackets

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language ObjectPascal
View previous topic :: View next topic  
Author Message
Ellobo
Guest





PostPosted: Fri Feb 23, 2007 4:17 pm    Post subject: Read and extract the values between 2 brackets Reply with quote



Hi people,

What I need is a function to extract the values between 2 brackets
and put a flag(or something like that) where the words 'AND' or 'OR'
are located and if they are located between 2 brackets.

For example a text can look like this:

(
(
Value1 = 1
OR
VALUE1 = 2
OR
(
VALUE1 = 3
OR
VALUE1 = 4
)
AND
Value2 = 100


Can someone help me with this?

Any help would be very appreciated.

Thanks in advance.

Paul
Back to top
Ellobo
Guest





PostPosted: Fri Feb 23, 2007 4:56 pm    Post subject: Re: Read and extract the values between 2 brackets Reply with quote



Hello again,

FYI.
The function should return a result like this:

Original
========
AND
(
(
Value1 = 1
OR
VALUE1 = 2
)
OR
(
VALUE1 = 3
OR
VALUE1 = 4
)
)
AND
Value2 = 100

Result
======
OpenFlag1
DetailFlag Value1 = 1
DetailFlag Value = 2
BetweenFlag
DetailFlag Value1 = 3
DetailFlag Value = 4
OpenFlag2
DetailFlag Value2 = 100

Thanks Paul

On 23 feb, 11:17, "Ellobo" <ellobo1...@gmail.com> wrote:
Quote:
Hi people,

What I need is a function to extract the values between 2brackets
and put a flag(or something like that) where the words 'AND' or 'OR'
are located and if they are located between 2brackets.

For example a text can look like this:

(
(
Value1 = 1
OR
VALUE1 = 2
OR
(
VALUE1 = 3
OR
VALUE1 = 4
)
AND
Value2 = 100

Can someone help me with this?

Any help would be very appreciated.

Thanks in advance.

Paul
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language ObjectPascal All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.