🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #14638

Re: kill files & regular expressions

#14638
From: Wayne Davison
Date: Mon, 16 Jan 1995 21:57
23 lines
1494 bytes
According to Paul Clark <prc@sysmag.com>:
> /^Newsgroups: *,*,*,*/h:j
> not do the trick?

No, '*'s in searches are not evaluated as wildcards (except when scanning
for a newsgroup name) and they are never anchored unless you explicitly
ask them to be.  Your regex above matches (after the ':') any number of
spaces (including zero) and then (redundantly) any number of consecutive
commas (including zero) and then any other text (so it matches all
Newsgroups lines).

> Having said that, I'm not sure why yours matches anything, since you require
> a comma at the end

No, requiring a comma to be at the end would look like this:

	/^newsgroups:.*,$/h:j
or	/,$/Hnewsgroups:j

(note the end-of-string anchor, '$').
-- 
Wayne Davison
davison@borland.com
Technical Details
Message-ID: <D2IqCD.5Cn@borland.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!pad-thai.cam.ov.com!bloom-beacon.mit.edu!hookup!swrinde!howland.reston.ans.net!gatech!concert!decwrl!borland.com!not-for-mail
References: <3esnno$ndm@ringer.cs.utsa.edu> <790085732snz@sysmag.com>

Show Full Headers
Complete Article Headers
Message-ID: <D2IqCD.5Cn@borland.com>
Subject: Re: kill files & regular expressions
Date: Mon, 16 Jan 1995 21:57:49 GMT
From: davison@borland.com (Wayne Davison)
References: <3esnno$ndm@ringer.cs.utsa.edu> <790085732snz@sysmag.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!pad-thai.cam.ov.com!bloom-beacon.mit.edu!hookup!swrinde!howland.reston.ans.net!gatech!concert!decwrl!borland.com!not-for-mail
Newsgroups: news.software.readers
Sender: news@borland.com (News Admin)
Organization: Borland International
Lines: 23