Article View: news.software.readers
Article #243255Re: Dialog (regex defect): Action rule using "Header" scans into body of post
From: Oliver Cromm
Date: Tue, 16 Nov 2010 22:37
Date: Tue, 16 Nov 2010 22:37
40 lines
3232 bytes
3232 bytes
* VanguardLH: [...] > I guess I'm still engrained in the old C programming style where \n > meant newline which could be \n or \r\n depending on the OS where the > end-of-line sequence was being added to the document. So I figured on > Windows that \n meant the CR-LF sequence. Well, according to the wiki > article at http://en.wikipedia.org/wiki/Newline, PCRE might still only > be using \n as the linefeed character. > > I replace the $ trailing anchor (for end-of-line) with \r\n, as in: > > ^Path: .+![^!]+\.othernsp\.com(!not-for-mail)?\r > > This worked to match on just the trailing text in the same line as where > the Path header is defined. I didn't even need the (?-s) operator > (which doesn't seem implemented in Dialog). It certainly is implemented. If, in your example, you change the regexp to the following, you should have no match (at least on the .41 version of Dialog): (?-s)^Path: .+report\.othernsp\.com$ Now change to (?s) or remove the switch, and you get a match, spanning two lines. I forgot about (?-s) again, even though that's what I used before to test on single headers. However, I had no need of testing the end of line at the same time. As for (?-m), it is the opposite of what I remembered: With (?-m), ^ and $ don't match lines any more, only the whole string, so that's what you don't want. The examples you gave should be OK with (?-s), maybe your tests were too complex to see it? -- die gugel gehört seit je zur narrenkleidung: GRIMM, Deutsches Wörterbuch
Technical Details
Message-ID:
<1le8kk22ig1xw$.dlg@mid.crommatograph.info>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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!auth.beige.octanews.com.POSTED!not-for-mailReferences:
<ibieuc$fa1$1@news.albasani.net> <4jnelelbf8ic.dlg@mid.crommatograph.info> <ibrutm$26h$1@news.albasani.net> <ibt23d$lq6$1@news.albasani.net> <MPG.274c0684271c22009896b2@news.individual.net> <ibuse3$g7b$1@news.albasani.net>Show Full Headers
Complete Article Headers
Message-ID: <1le8kk22ig1xw$.dlg@mid.crommatograph.info>
Subject: Re: Dialog (regex defect): Action rule using "Header" scans into body of post
Date: Tue, 16 Nov 2010 17:37:07 -0500
From: Oliver Cromm <lispamateur@crommatograph.info>
References: <ibieuc$fa1$1@news.albasani.net> <4jnelelbf8ic.dlg@mid.crommatograph.info> <ibrutm$26h$1@news.albasani.net> <ibt23d$lq6$1@news.albasani.net> <MPG.274c0684271c22009896b2@news.individual.net> <ibuse3$g7b$1@news.albasani.net>
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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!auth.beige.octanews.com.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.41
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Organization: Bananologisches Institut
X-Face: .f:ZE>c\~9oJ+1nK#>ntSHOQS~4x"Qx2m(<D<@p$G"tzb1lgWLUGY.zApKa@VL_?d$r(8=?VjrD9=uY:x!+H=hvj58Uw7)Y9<:KMYD.+^~#qMpeg2rvt`{#2a~7YoyFaFaBEdo4.TJzBqgtCZZ:mku4J|hey}DE}_"z(rl0N)\Pxh*0$"3B2mr\01&YPY7WJ:2kSe'I#PqiTxs1s49!S#W85'\zMXy*wRgD,,k.=4:3M{(P"i6S;
\az~ut3z`; ?*Y;
&]11<(EPF-SN`|3PhyL%~AuZpoFjjE_oM1`znHPq_?uib2WXwE+q@m),cLq~B$r^5uO]u6?CEecn=%xsDXNVa(1DX.)O(
Cancel-Lock: sha1:iKEQCiDhPl+UY1tW/jzDgnQ8POc=
Lines: 40
NNTP-Posting-Date: 16 Nov 2010 16:37:08 CST
X-Complaints-To: abuse@octanews.net