Article View: news.software.readers
Article #110848Re: Neeed help converting Agent regex-filter to Xnews...
From: Murray Peterson
Date: Sun, 06 Oct 2002 22:44
Date: Sun, 06 Oct 2002 22:44
39 lines
2676 bytes
2676 bytes
Rene Brehmer <cerberus@mail-telia.dk> wrote in
news:Xns92982FA33E02Cmetalbunnynet@194.255.237.239:
> I've tried to figure out Xnews' regex syntax, but am unsure on its use
> of parentheses ...
Xnews uses standard regular expressions, so any reference on them will tell
you what you need to know. The pcre.html file in the Xnews directory goves
you a good start. In general, assume that you don't need parentheses, at
least as compared to Agent.
> If any of the Agent-to-Xnews guys could help me with this, I'd really
> appreciate it ... maybe once I've figured Xnews' regex out properly, I
> can write a conversion program (if one already exist, please guide me
> to it)...
I used to use Agent, but the big trick is to remember all of its strange
(and non-standard) filtering rules. Some simple translation rules:
Agent is word-based, so if you want an exact match for "abducted*",
then you would need to use "\babducted.*?\b". In general, this sort
of translation is excessively literal, and really doesn't gain you
much. It is much easier to just match for "abducted" in Xnews.
Same for the "ad[o|0]lescent.*" term in Agent -- just match for
any character in that spot: "ad.lescent".
Don't put spaces before or after your OR markers ("|").
Leave out all the parentheses.
If you want a major set of binary spam filters for Xnews, there is a sample
score file on my home page. It has all of your words and phrases, plus
many, many more.
--
Murray Peterson
Email: murray_peterson@shaw.ca (remove underscore)
URL: http://members.shaw.ca/murraypeterson/
Technical Details
Message-ID:
<Xns929FAA5F43C20farkle@24.71.223.159>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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!ps01-sjc1!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news2.calgary.shaw.ca.POSTED!not-for-mailReferences:
<Xns92982FA33E02Cmetalbunnynet@194.255.237.239>Show Full Headers
Complete Article Headers
Message-ID: <Xns929FAA5F43C20farkle@24.71.223.159> Subject: Re: Neeed help converting Agent regex-filter to Xnews... Date: Sun, 06 Oct 2002 22:44:27 GMT From: Murray Peterson <mwp@home.com.invalid> References: <Xns92982FA33E02Cmetalbunnynet@194.255.237.239> 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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!ps01-sjc1!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news2.calgary.shaw.ca.POSTED!not-for-mail X-Trace-PostClient-IP: 68.145.202.240 Newsgroups: news.software.readers Organization: None User-Agent: Xnews/5.04.25 Lines: 38 NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse@shaw.ca X-Trace: news2.calgary.shaw.ca 1033944267 24.71.223.147 (Sun, 06 Oct 2002 16:44:27 MDT) NNTP-Posting-Date: Sun, 06 Oct 2002 16:44:27 MDT