Re: leafnode 2 not creating "all_links" in gmane hierarchy.

Matthias Andree <[email protected]>
Newsgroups gmane.network.leafnode
Message-ID <[email protected]>
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 .*.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.