Article View: news.software.nntp
Article #88483Re: Cleanfeed and arbitrary headers.
From: Matija Nalis
Date: Sun, 30 Aug 2020 20:04
Date: Sun, 30 Aug 2020 20:04
28 lines
1982 bytes
1982 bytes
On Sat, 29 Aug 2020 10:04:20 -0600, Grant Taylor <gtaylor@tnetconsulting.net> wrote:
> I think that "\w" includes a-z A-Z 0-9 and underscore.
> Though as I look at sample data, I may need to include hyphens.
>
> I'd rather not write out this full set, but it may be needed until I
> figure out a more concise way to do it.
>
> [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]
[\w-] is much shorter and as good in perl. Note that '-' must be last in
'[]', otherwise it will be treated as range (like for example '[a-zA-Z0-9]')
perlre(1) man page goes into more detail...
> It looks like I might want to use something like the following:
>
> return reject('Messages from <bla> posting-account are banned.',
> 'Banned posting-account');
>
> It would be really nice if I could fill <bla> with the actual value.
return reject("Messages from $ACC posting-account are banned.", 'Banned posting-account');
That is, change ' to " and then you can do variable substitution inside
("$ACC" in example above, to which you need to assign value first, of course)
--
Opinions above are GNU-copylefted.
Technical Details
Message-ID:
<slrnrko1i8.hcm.mnalis-news@leia.home.lan>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<ricgun$ti2$1@tncsrv09.home.tnetconsulting.net> <rid5n1$3bl$1@nemo.pasdenom.info> <ridudk$f2c$1@tncsrv09.home.tnetconsulting.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnrko1i8.hcm.mnalis-news@leia.home.lan> Subject: Re: Cleanfeed and arbitrary headers. Date: Sun, 30 Aug 2020 22:04:24 +0200 From: Matija Nalis <mnalis-news@voyager.hr> References: <ricgun$ti2$1@tncsrv09.home.tnetconsulting.net> <rid5n1$3bl$1@nemo.pasdenom.info> <ridudk$f2c$1@tncsrv09.home.tnetconsulting.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: CARNet, Croatia Sender: mnalis@public.hr Injection-Info: news1.carnet.hr; posting-host="78.3.211.151"; logging-data="13399"; mail-complaints-to="abuse@CARNet.hr" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:KLyZDlwaFBxKeZKlOvjjy/Fqx2k=