From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f4006c440754467b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Wide Finder in Ada? From: Georg Bauhaus In-Reply-To: <47380779$1@news.post.ch> References: <1194831460.619945.188980@v3g2000hsg.googlegroups.com> <47380779$1@news.post.ch> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1194864859.6298.8.camel@K72> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Date: Mon, 12 Nov 2007 11:54:19 +0100 Organization: Arcor NNTP-Posting-Date: 12 Nov 2007 11:54:19 CET NNTP-Posting-Host: afe41cd1.newsspool2.arcor-online.net X-Trace: DXC=AEJZn8bal?`Ikjb;<8iR=aA9EHlD;3Ycb4Fo<]lROoRa4nDHegD_]Re@M\f7D`B\^hA:ho7QcPOVc\059>6WNQ>o]L:E56ecEji X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18302 Date: 2007-11-12T11:54:19+01:00 List-Id: On Mon, 2007-11-12 at 08:57 +0100, Martin Krischik wrote: > 1.1 Search for %r{GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+) } > > First improvement would be the use of Splitbool instead of regular > expressions. Do you mean SPITBOL? In this case, here is a simple and quick way to to the pattern extraction (the ' 'sentinel at the end of each line might not be necessary or worked around or it doesn't matter if it can be set by some Input). digit = any('0123456789') D2 = digit digit D3 = digit D2 D4 = digit D3 * results table counts = table() * read lines, find pages, and record hits L line = input :f(done) line = line ' ' line ? 'GET ' fence '/ongoing/When/' D3 'x/' . (D4 '/' D2 '/' D2 '/' break(' .')) . word . :f(L) counts[word] = counts[word] + 1 :(L) done