🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #58815

Re: [slrn] Full RE for article search

#58815
From: J.B. Nicholson-Owens
Date: Wed, 01 Mar 2000 00:00
28 lines
1670 bytes
Heikki Kantola wrote:

> Of course such thing isn't impossible, but at least vanilla S-Lang RE
> matching can't be used to implement such behaviour as unfortunately it
> doesn't include grouping operations. :(

The closest thing I could think of (short of implementing another regex 
engine or linking in a more functional one) is using an orelse/andelse 
clause(s).  Instead of matching against "a (long|short|windy) day", you 
could use something like:

#v+
   if (orelse
         { string_match (my_string, "a long day", 1) }
         { string_match (my_string, "a short day", 1) }
         { string_match (my_string, "a windy day", 1) })
      {
         .
         .
         .
      }
#v-

But that's pretty verbose and doesn't scale well (not to mention it's 
inappropriate for user-supplied regexes).  Maybe linking in pcre would 
be worthwhile?

Technical Details
Message-ID: <jbn-183B93.03555001032000@news>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn8bneid.ap1.cgreen@shell.x-1.net> <slrn8bo2ht.413q.hezu@tuuri.ling.helsinki.fi>

Show Full Headers
Complete Article Headers
Message-ID: <jbn-183B93.03555001032000@news>
Subject: Re: [slrn] Full RE for article search
Date: Wed, 01 Mar 2000 00:00:00 +0000
From: "J.B. Nicholson-Owens" <jbn@mystery-train.pdnt.com>
References: <slrn8bneid.ap1.cgreen@shell.x-1.net> <slrn8bo2ht.413q.hezu@tuuri.ling.helsinki.fi>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 591691869
X-Complaints-To: abuse@pdnt.com
X-Trace: sol.pdnt.net 951904221 209.16.217.234 (Wed, 01 Mar 2000 03:50:21 CST)
User-Agent: MT-NewsWatcher/3.0 (PPC)
NNTP-Posting-Date: Wed, 01 Mar 2000 03:50:21 CST
Newsgroups: news.software.readers