[leafnode-list] Re: leafnode 2 not creating "all_links" in gmane hierarchy.

Matthias Andree matthias.andree at gmx.de
Wed May 11 10:55:52 CEST 2011


Am 10.05.2011 14:45, schrieb Adam Funk:
> On 2011-05-09, clemens fischer wrote:
> 
>> On Mon-2011/05/09-19:01 Christian Ebert wrote:
>>
>>> * clemens fischer on Monday, May 09, 2011 at 16:26:38 +0200
>>>> On Mon-2011/05/09-14:38 Adam Funk wrote:
>>>>>>> #v+
>>>>>>> server = news.gmane.org
>>>>>>> only_groups_pcre = (gmane\.|control\.)
>>>>>>> #v-
>>>>
>>>> This doesn't bear on your problem, but why isn't this:
>>>>
>>>>    only_groups_pcre = ^(gmane\.|control\.)
>>>
>>> Because man leafnode says you do not need to anchor this pcre?
>>>
>>> only_groups_pcre = PCRE
>>>    This  parameter  lists  the  Perl-compatible regular
>>>    expression of groups that are fetched or posted to this
>>>    server. The PCRE is automatically anchored at the left hand
>>>    side,  so  you  can omit the  leading  ^.  Remember  to
>>>    escape dots, as in: de\.comp\.|de\.comm\. Another example
>>>    might be only_groups_pcre=de\.(?!alt) that fetches all  de.*
>>>    groups  that  are  not  de.alt.* groups. Consult the PCRE
>>>    documentation for details.
>>
>> Oopsie.  I forgot about this.
> 
> Well, I put the caret in yesterday anyway.  It looks nice & my other
> only_groups_pcre rules have it.

It doesn't hurt if you do that.  But you need to pay some attention when
using alternatives with the pipe ("|") character, since

^alt1|alt2

would normally match alt2 anywhere in the word, not just at the beginning.

^(alt1|alt2) is what many people new to REs mean -- and to avoid such
surprises, I'm anchoring the regexp.  De-anchoring can be specified by
.*?, a non-greedy version of .*.



More information about the leafnode-list mailing list