Thread View: borland.public.delphi.language.objectpascal
2 messages
2 total messages
Started by Ellobo
Fri, 23 Feb 2007 10:17
Read and extract the values between 2 brackets
Author: Ellobo
Date: Fri, 23 Feb 2007 10:17
Date: Fri, 23 Feb 2007 10:17
30 lines
1584 bytes
1584 bytes
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
Re: Read and extract the values between 2 brackets
Author: Ellobo
Date: Fri, 23 Feb 2007 10:56
Date: Fri, 23 Feb 2007 10:56
67 lines
2205 bytes
2205 bytes
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: > 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads