🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #243251

Re: Dialog (regex defect): Action rule using "Header" scans into body of post

#243251
From: Tom B.
Date: Tue, 16 Nov 2010 19:49
29 lines
2162 bytes
VanguardLH wrote in "news.software.readers" ...

[trimmed]

> The use of Header in an action rule seems to look for that string to
> appear anywhere in the article, including in the body, and also of
> parsing its value off into the body section.  I'm accustomed to using
> the greedy versions of regex so maybe I need to think how to code the
> regex to be non-greedy so somehow it cannot extend beyond a single line.

[trimmed]

Greediness can be turned off on the repetitions "*" and "+" with a 
question mark. As in "*?" and "+?"

PCRE also has some weirdo option to turn off greediness for the 
whole PCRE. I think it is (?U) but haven't used that one 
personally.

We ran into this stuff with Gravity. We decided to allow matching 
on all headers by just sending the whole article, headers and all 
through the PCRE engine. But the actual matching is easier said 
than done for the average user, because of the greediness, the dot, 
the $, and the multiline matching.

-- 
Tom B.      * * * Gravity Web Pages  * * *
http://mpgravity.sourceforge.net/ (official site)
http://gravity.tbates.org/
Technical Details
Message-ID: <MPG.274caa6092629d7b9896b4@news.individual.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!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <ibieuc$fa1$1@news.albasani.net>

Show Full Headers
Complete Article Headers
Message-ID: <MPG.274caa6092629d7b9896b4@news.individual.net>
Subject: Re: Dialog (regex defect): Action rule using "Header" scans into body of post
Date: Tue, 16 Nov 2010 14:49:37 -0500
From: "Tom B." <nfn03862@naples.net>
References: <ibieuc$fa1$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!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Lines: 29
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 9ty78bP/eywVs5PZuR+7ywqk+TveyzlmGXNaL6USiPmFvy+QY=
Cancel-Lock: sha1:en5OZFjxaixzWivNES6i69yXyPI=
User-Agent: MicroPlanet-Gravity/3.0.4
X-Original-Bytes: 1941