Article View: news.software.readers
Article #59624Re: [slrn] possible to use 'or' expression in s-lang regular expression?
From: Dawn Owens-Nicholson
Date: Sat, 25 Mar 2000 00:00
Date: Sat, 25 Mar 2000 00:00
28 lines
1431 bytes
1431 bytes
Jurriaan W Kalkman wrote:
> Is it possible to score either
>
> Get Rich Quick
> Get Rich Fast
>
> with
>
> Subject: Get Rich Quick|Fast
>
> or something like that?
You're probably thinking of "Get Rich (Quick|Fast)". But you can't do
alternation in S-Lang regular expressions. If you're writing S-Lang, use
orelse:
if (orelse
{ string_match (subject, "Get Rich Quick", 1) }
{ string_match (subject, "Get Rich Fast", 1) })
{
.
.
.
}
Or you could link in another regex engine and use its syntax.
Technical Details
Message-ID:
<slrn8dq0rs.h84.bluemoon@ux6.cso.uiuc.edu>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-mailReferences:
<slrn8dpjcj.9s1._hate_spam_thunder7@middle.of.nowhere>Show Full Headers
Complete Article Headers
Message-ID: <slrn8dq0rs.h84.bluemoon@ux6.cso.uiuc.edu> Subject: Re: [slrn] possible to use 'or' expression in s-lang regular expression? Date: Sat, 25 Mar 2000 00:00:00 +0000 From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson) References: <slrn8dpjcj.9s1._hate_spam_thunder7@middle.of.nowhere> 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: 602306662 X-Complaints-To: abuse@uiuc.edu X-Trace: vixen.cso.uiuc.edu 954008431 128.174.5.9 (Sat, 25 Mar 2000 12:20:31 CST) Organization: University of Illinois at Urbana-Champaign User-Agent: slrn/0.9.6.2 (HP-UX) NNTP-Posting-Date: Sat, 25 Mar 2000 12:20:31 CST Newsgroups: news.software.readers