Article View: borland.public.delphi.language.objectpascal
Article #32460Re: Texthandling q from a newbie
From: Ben Hochstrasser
Date: Sat, 23 Nov 2002 14:26
Date: Sat, 23 Nov 2002 14:26
21 lines
1412 bytes
1412 bytes
fredde wrote:
> I have a logfile with so much crap that i cant read it, so i want to
> search the file for lets say: DEBUG, and i want the debug line until
> an " and put that in another file and keep on doing it until theres no
> <snip>
ahem...shouldn't be too hard.
...
lst := TStringList.Create;
lst.LoadFromFile(debuglogfile)
for n := lst.Count - 1 downto 0 do
if pos('DEBUG', lst.strings[n]) = 0 then
lst.delete(n);
....
else just use "find" (windows) or "grep" (unix)...
--
Ben
Technical Details
Message-ID:
<Xns92CF9D11E815Cbhoc@207.105.83.65>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.stealth.net!news.stealth.net!ngpeer.news.aol.com!newsfeed1.cidera.com!Cidera!news.uni-x.net!newsgroups.borland.com!not-for-mailReferences:
<3ddf8ad0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109d30,e77577180adb3224,start X-Google-Attributes: gid109d30,public X-Google-ArrivalTime: 2002-11-23 07:15:38 PST Newsgroups: borland.public.delphi.language.objectpascal Subject: Re: Texthandling q from a newbie From: Ben Hochstrasser <bhoc@surfeu123^H^H^H.ch> References: <3ddf8ad0$1@newsgroups.borland.com> Organization: Huh? Message-ID: <Xns92CF9D11E815Cbhoc@207.105.83.65> User-Agent: Xnews/5.04.25 NNTP-Posting-Host: 217.162.192.226 Date: 23 Nov 2002 06:26:26 -0800 X-Trace: newsgroups.borland.com 1038061586 217.162.192.226 (23 Nov 2002 06:26:26 -0800) Lines: 21 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.stealth.net!news.stealth.net!ngpeer.news.aol.com!newsfeed1.cidera.com!Cidera!news.uni-x.net!newsgroups.borland.com!not-for-mail