help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnus nnmail-split-fancy regexps can’t support backrefs inside themse


From: Garreau, Alexandre
Subject: Re: Gnus nnmail-split-fancy regexps can’t support backrefs inside themselves?
Date: Mon, 19 Mar 2018 13:57:07 +0100
User-agent: Gnus (5.13), GNU Emacs 25.1.1 (x86_64-pc-linux-gnu)

Le 17/03/2018 à 09h25, tomas@tuxteam.de a écrit :
> On Fri, Mar 16, 2018 at 08:15:59PM +0100, Garreau, Alexandre wrote:
>> If I use a rule with a match regexp including a backreference inside the
>> variable nnmail-split-fancy, it doesn’t match anything anymore:
>> ("list-id" ".*<\\(gcc\\)-\\(help\\).\\1.\\(gnu\\)\\.org>.*" 
>> "lists.\\3.\\1.\\2")
>
> What are you trying to match? The above will match "gcc-help#gcc#gnu.org
> (where '#' stands here for any character). This looks strange to me (what
> is the use of \\(...\\) for a constant match? \1 will always (in the case
> of a match, that is) be "gcc", \2 always "help" and \3 always "gnu".
>
> Is that really your intention? What are you trying to match?

Yes, and sorry (for the .), indeed I did correct this since, it is now
".*<\\(gcc\\)-\\(help\\)\\.gcc\\.\\(gnu\\)\\.org>.*". As the variable
I’m talking about and the car of the list I’m talking about show, I’m
trying to match the list-id mail header of the gcc-help mailing list,
which contains “<gcc-help.gcc.gnu.org>”, but I reuse the words “gnu”,
“gcc” and help in the group name I’m splitting this in
(“lists.gnu.gcc.help”), so I group these names, so that later I can
better factorise with other splitting rules. For maintainance and
factorisations reasons, I’d also like to write “gcc” only once here,
except it seems gnus/mail-split stops to match anything as soon as I
include backrefs in the searching regexp.

>> Yet backrefs are supported on the other side of the rule… is this
>> normal? why is that? I at least would like a confirmation ^^
>
> Yes, backreferences should work OK.

So why isn’t this regexp matching any line containing
“<gcc-help.gcc.gnu.org>”?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]