Article View: news.software.readers
Article #138080Re: Import Xnews scorefile to PAN?
From: J.B. Nicholson-Owens
Date: Mon, 24 Nov 2003 07:40
Date: Mon, 24 Nov 2003 07:40
51 lines
3066 bytes
3066 bytes
Tech Zero wrote:
> Xnews uses PCRE...
Here's the help I can muster on the subject of converting one's Xnews
scorefile to slrn. Hopefully this will work well enough for Pan to be of
use there too.
If it uses PCRE regular expressions throughout the score file, and if one is
making a slrn-compatible scorefile, one would need to convert regular
expressions to wildmats. This is not always possible because wildmats are
far less expressive (one can do certain limited forms of wildcard entries).
Going from wildmats to regular expressions is lossless, going the other way
is lossy.
Wildmats are only probably going to work on ASCII characters. See the
description in http://www.faqs.org/rfcs/rfc2980.html (Common NNTP
Extensions), section 3.3.1 for informative examples of wildmat ranges.
Pan might use a different regular expression engine than slrn. I don't know
exactly which one it uses, so to be safe, try rewriting regular expressions
with only
.*?+()[]^$
metacharacters and they're typically accepted meaning. You can also safely
use a backslash to escape metacharacters.
S-Lang's regular expression engine supports two zero-width assertions
matching the beginning and ending word boundaries ("\<" and "\>").
Alternation is not supported in S-Lang regular expressions, but you might be
able to get along with slrn scores that look like
[group-wildmat]
Score:: 100 % <-- note the two colons on this line meaning OR.
From: someone you want to read
From: someone@you.want.to.read.com
or mentioning multiple newsgroups
[alt.alpha, alt.beta]
Finally, avoid using parentheses for grouping:
foo(and)?bar
matches "fooandbar" or "foobar" with PCRE but is nonsensical with S-Lang's
regular expression engine because the parentheses only work to build
backreferences and the question mark only matches a single character.
Happy newsreading.
Technical Details
Message-ID:
<slrnbs3dil.79d.jbn@forestfield.org>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!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!ihug.co.nz!skynet.be!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mailReferences:
<4f73e0802a1301ae850a644d6d7029f8@news.teranews.com> <slrnbs2o95.79d.jbn@forestfield.org> <Xns943CCCDFB5C8FZeroOne@news.individual.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnbs3dil.79d.jbn@forestfield.org> Subject: Re: Import Xnews scorefile to PAN? Date: Mon, 24 Nov 2003 07:40:37 +0000 From: "J.B. Nicholson-Owens" <jbn@forestfield.org> References: <4f73e0802a1301ae850a644d6d7029f8@news.teranews.com> <slrnbs2o95.79d.jbn@forestfield.org> <Xns943CCCDFB5C8FZeroOne@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!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!ihug.co.nz!skynet.be!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail Newsgroups: news.software.readers Organization: Forest Field OmniMedia Lines: 51 NNTP-Posting-Host: forestfield.org (208.216.67.173) X-Trace: news.uni-berlin.de 1069659637 62338775 208.216.67.173 (16 [35848]) Mail-Copies-To: nobody User-Agent: slrn/0.9.8.0 (Linux)