Article View: news.software.readers
Article #166662Re: [Dialog] Simple filter question, but I'm dumb
From: Korbinian Abenthum
Date: Thu, 12 May 2005 15:16
Date: Thu, 12 May 2005 15:16
56 lines
3947 bytes
3947 bytes
Disciple wrote:
> On Wed, 11 May 2005 21:00:28 +0200, Korbinian Abenthum wrote:
>> Not quite, you have to put it in curly brackets {} to let DIALOG know it's a
>> regular expression.
> Is this noted in the Dialog help file on the web site any where?
Yes, e.g. here DIALOG.chm::/scoringactionsyntax.htm
(look for the occurance of "X-MyUniqueXHeader" and the text beneath)
> Testing the above regex in Dialog's built in tester it passes. However
> adding {} to encase the expression causes it to fail.
Yes, the tester expects only the pure regular expression, but the Scoring
engine needs means to distinct between simple text matches (like "match" or
just plain text) and regex (like {epression})
>> And just adding a whitespace after the buzzwords won't work if it's at the
>> end of the subject, I guess,
> I don't understand what you are saying here.
If you try to match the regEx {Bush\s} with the subject "Don't vote for
Bush", you will not get a match, since there is no whitespace after the
buzzword.
(CMIIW, since DIALOG *might* always add the carriage return to the subject,
which counts as a whitespace)
> Not having a full understanding of the syntax of regex expressions the
> white space was a quick way to prevent a match on Joe Bushman or any
> other word that contains a target word. However I see your syntax works
> better,
JFTR: The \b is a marker for transitions between non-wordcharacters and
wordcharacters. So \bBush\b matches only Bush as *a* word.
> I am going to have
> to study it more. The following works with all regex testers I have
> available, I did add the lower case for the words that may appear that way.
>| (?-i)\b(Bush|[Ww]ar|Iraq|Clinton|Kerry|[Vv]iagra|[Mm]ake [Mm]oney|FoxNews|CNN)\b
>>| !delete Subject {(?-i)\b(Bush|War|Iraq|Clinton|Kerry|Viagra|Make Money|FoxNews|CNN)\b}
> One thing I don't understand, and can't find an explication for is the -i
> in (?-i). Would you mind explaining what it does?
By default, DIALOG is case-insensitive. (?-i) is a switch to turn that off
(and that's why you had to add lower case for some words manually.
See "Modifiers" in DIALOG.chm::/regularexpressions.htm
--
"Rhaegar fought valiantly, Rhaegar fought nobly, Rhaegar fought honorably.
And Rhaegar died." (Jorah Mormont)
Technical Details
Message-ID:
<120505.171645.nsr.13@news.abenthum.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!centaur.lucky.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mailReferences:
<meiefrgvr7wj.o29tbzp1s3bd.dlg@40tude.net> <cbxeht62zwfj.12mqhui9xp9sg$.dlg@40tude.net> <1115821108.46@anchedo.newsoffice.de> <2o5weqx6xj9k.3m5ke166ftza$.dlg@40tude.net> <d5tdpl01lpo@enews3.newsguy.com> <110505.210028.nsr.11@news.abenthum.de> <d5vlmn024rd@enews3.newsguy.com>Show Full Headers
Complete Article Headers
Message-ID: <120505.171645.nsr.13@news.abenthum.de>
Subject: Re: [Dialog] Simple filter question, but I'm dumb
Date: Thu, 12 May 2005 17:16:45 +0200
From: Korbinian Abenthum <korbinian@gmx.de>
References: <meiefrgvr7wj.o29tbzp1s3bd.dlg@40tude.net> <cbxeht62zwfj.12mqhui9xp9sg$.dlg@40tude.net> <1115821108.46@anchedo.newsoffice.de> <2o5weqx6xj9k.3m5ke166ftza$.dlg@40tude.net> <d5tdpl01lpo@enews3.newsguy.com> <110505.210028.nsr.11@news.abenthum.de> <d5vlmn024rd@enews3.newsguy.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!centaur.lucky.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail
Newsgroups: news.software.readers
Supersedes: <120505.171434.nsr.12@news.abenthum.de>
Organization: T-Online
Lines: 56
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.t-online.com 1115910948 01 3955 Cfiur5ZOvnwpBy 050512 15:15:47
X-Complaints-To: usenet-abuse@t-online.de
X-ID: VmrWA-Zd8eoehS2lHUVGH3f05DlDdvPHOeVoOypBoOnfybIp2v83UF
User-Agent: 40tude_Dialog/2.0.15.1 Hamster/2.0.6.0
X-Face: &[gF$*:|'M7pwKut]{LOz!&65BT96:Wn\M"V6Qa#q%~9^z8XhJfmh?.)VB{,
p]Z`6q@e()! g1ghrG7.atG.DXfzulkKE%u~|D7?e6^-yN4GvZJuvz%$LZBA6`dJTo,
MYUO%I*0us[.v/AT,