🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Tobias Mummert Tue, 09 Sep 2003 18:17
[slrn] identity.sl macro
#133072
Author: Tobias Mummert
Date: Tue, 09 Sep 2003 18:17
21 lines
1461 bytes
Hi,

adding a new identity for the de.* hierarchy is done with:

identity->add_new ("german", "^de\.");

which works fine.

My question is: What's the regular expression matching all non de.*
hierachy groups?

identity->add_new ("non-german", "!(^de\.)");

is not working.

Regards,
Tobias
-- 
BOFH excuse #158:
Defunct processes
Re: [slrn] identity.sl macro
#133090
Author: Mark Hill
Date: Tue, 09 Sep 2003 22:53
17 lines
1222 bytes
On 2003-09-09, 
 Tobias Mummert <teergrube@phreaker.net> wrote:
 
> My question is: What's the regular expression matching all non de.*
> hierachy groups?
>
> identity->add_new ("non-german", "!(^de\.)");
>
> is not working.

The not operand in s-lang is ~ (tilde), so maybe replacing ! with ~ will
work.


-- 
Mark Hill <mark_usenet@yahoo.co.uk>
Re: [slrn] identity.sl macro
#133097
Author: Tobias Mummert
Date: Wed, 10 Sep 2003 11:10
31 lines
2033 bytes
* Mark Hill <mark_usenet@yahoo.co.uk> wrote:

> On 2003-09-09, 
>  Tobias Mummert <teergrube@phreaker.net> wrote:
>  
>> My question is: What's the regular expression matching all non de.*
>> hierachy groups?
>>
>> identity->add_new ("non-german", "!(^de\.)");
>>
>> is not working.
>
> The not operand in s-lang is ~ (tilde), so maybe replacing ! with ~ will
> work.

Thanks Mark, but unfortunately even by using the ~ (tilde), there is no
effect. I've tried to fix the problem with these expressions:

identity->add_new ("non-german", "~(^de\.)");
identity->add_new ("non-german", "~\(^de\.\)");
identity->add_new ("non-german", "!(^de\.)");
identity->add_new ("non-german", "!\(^de\.\)");

None of them worked.

Best regards,
Tobias
-- 
BOFH excuse #313:
your process is not ISO 9000 compliant
Re: [slrn] identity.sl macro
#133103
Author: Emmanuele Bassi
Date: Wed, 10 Sep 2003 13:55
29 lines
2297 bytes
* Tobias Mummert [2003-09-09 20:17]:

> My question is: What's the regular expression matching all non de.*
> hierachy groups?
> 
> identity->add_new ("non-german", "!(^de\.)");
> 
> is not working.

Try using the tilde (~) in place of the exclamation mark, and removing
the parenthesis.

I must admit that I fail to see the point in setting a variable for
"!de.*": just set the signature you want on all hierarchies *but* de.*
as a default inside your slrnrc, and then set the signature for de.*
using identity.  If you need another hierarchy to use the "de.*"
signature, just clone the identity and change the regular expression.

At least, that's how I use identity: the values inside the slrnrc file
are meant as defaults (duh!); each and every exception from the default
should be handled using the identity macro.

Bye,
 Emmanuele.

-- 
Emmanuele Bassi           [ http://digilander.libero.it/ebassi/slrn.html ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4
Re: [slrn] identity.sl macro
#133142
Author: Tobias Mummert
Date: Thu, 11 Sep 2003 06:56
35 lines
2732 bytes
* Emmanuele Bassi on 10/09/2003 [13:55 GMT]:

> Try using the tilde (~) in place of the exclamation mark, and removing
> the parenthesis.

Thanks Emmanuele, but I've tried that before - with no positive effect.

> I must admit that I fail to see the point in setting a variable for
> "!de.*": just set the signature you want on all hierarchies *but* de.*
> as a default inside your slrnrc, and then set the signature for de.*
> using identity.  If you need another hierarchy to use the "de.*"
> signature, just clone the identity and change the regular expression.

The 'problem' is, that the de.* hierarchy *is* actually my default one,
so I've defined the values for that hierarchy in my .slrnrc.
After that, I wanted to cover all the non-default values (i.e. the news.*,
rec.*, alt.* groups) with your identity.sl macro. I thougt, the best way
to match these groups with a regular expression would simply be a "non
de.*" expression.

> At least, that's how I use identity: the values inside the slrnrc file
> are meant as defaults (duh!); each and every exception from the default
> should be handled using the identity macro.

Yes, this works, but now my defaults are the non-de.* values in .slrnrc,
I'm not quite happy with this work-around, because there are a l ot more
options to configure in .slrnrc.

Best Regards,
Tobias
-- 
BOFH excuse #349:
Stray Alpha Particles from memory packaging caused Hard Memory Error on
Server.
Re: [slrn] identity.sl macro
#133226
Author: Emmanuele Bassi
Date: Fri, 12 Sep 2003 12:17
34 lines
2657 bytes
* Tobias Mummert [2003-09-11 08:56]:

>> Try using the tilde (~) in place of the exclamation mark, and removing
>> the parenthesis.
> 
> Thanks Emmanuele, but I've tried that before - with no positive effect.

Then, alas, you'll have to wait until a new release of the S-Lang
library hits my box: I'll release a version of identity which uses PCRE
for pattern matching as soon as SLRN is built against the PCRE module.

> The 'problem' is, that the de.* hierarchy *is* actually my default one,
> so I've defined the values for that hierarchy in my .slrnrc.
> After that, I wanted to cover all the non-default values (i.e. the news.*,
> rec.*, alt.* groups) with your identity.sl macro. I thougt, the best way
> to match these groups with a regular expression would simply be a "non
> de.*" expression.

I understand, now.

You'll have to create a "non-de" identity matching a hierarchy, in it
setting the values you want to be different, and then clone that
identity for each hierarchy.

I could provide a flag for "inverting" internally the regexp match, but
that would be an ugly hack.

Bye,
 Emmanuele.

-- 
Emmanuele Bassi           [ http://digilander.libero.it/ebassi/slrn.html ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4
Re: [slrn] identity.sl macro
#133233
Author: Tobias Mummert
Date: Fri, 12 Sep 2003 16:33
15 lines
1724 bytes
* Emmanuele Bassi on 2003-09-12 [12:17 GMT]:

> You'll have to create a "non-de" identity matching a hierarchy, in it
> setting the values you want to be different, and then clone that
> identity for each hierarchy.

Yes, I did so and it works fine. Thanks again for your answer.

Best Regards,
Tobias
-- 
BOFH excuse #203:
Write-only-memory subsystem too slow for this machine. Contact your
local dealer.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads