🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #163

Re: Read and extract the values between 2 brackets

#163
From: Ellobo
Date: Fri, 23 Feb 2007 10:56
67 lines
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
Technical Details
Message-ID: <1172228162.814509.115390@t69g2000cwt.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!t69g2000cwt.googlegroups.com!not-for-mail
References: <1172225850.980905.208230@j27g2000cwj.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 109d30,bcda02b3bc6804c3
X-Google-Attributes: gid109d30,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!t69g2000cwt.googlegroups.com!not-for-mail
From: "Ellobo" <ellobo1968@gmail.com>
Newsgroups: borland.public.delphi.language.objectpascal
Subject: Re: Read and extract the values between 2 brackets
Date: 23 Feb 2007 02:56:02 -0800
Organization: http://groups.google.com
Lines: 69
Message-ID: <1172228162.814509.115390@t69g2000cwt.googlegroups.com>
References: <1172225850.980905.208230@j27g2000cwj.googlegroups.com>
NNTP-Posting-Host: 212.203.16.52
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1172228169 24217 127.0.0.1 (23 Feb 2007 10:56:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 23 Feb 2007 10:56:09 +0000 (UTC)
In-Reply-To: <1172225850.980905.208230@j27g2000cwj.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 BCS-WEB
Complaints-To: groups-abuse@google.com
Injection-Info: t69g2000cwt.googlegroups.com; posting-host=212.203.16.52;
   posting-account=eGP6Rg0AAAAP2zk7sT9SnVtI67k9Tyyr