Gnus development mailing list
 help / color / mirror / Atom feed
From: Tommy Kelly <tommy.kelly@verilab.com>
To: ding@gnus.org
Subject: Re: nnimap-split-methods syntax
Date: Tue, 07 Dec 2010 19:38:04 +0000	[thread overview]
Message-ID: <m2zkshnzkz.fsf@verilab.com> (raw)
In-Reply-To: <m2lj42v6rb.fsf@igel.home>

Andreas Schwab <schwab@linux-m68k.org> writes:

> Tommy Kelly <tommy.kelly@verilab.com> writes:
>
>> Yeah, clearly (having begun reading regexp stuff) this is bonkers. I tried:
>>
>> ("0_to-me" "^From:.*verilab.com.*^To:.*tommy.kelly@verilab.com")
>>
>> But I then learned that "." doesn't match LF or CR.
>
> You can use "\\(.\\|\n\\)" to match really everything.

Thanks Andreas. And you're probably right that I need to dive into fancy
splitting. But sticking with the simple approach for a while -- and
taking your suggestion -- suppose I have a header block containing the
following: 

From: Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: nnimap-split-methods syntax
Newsgroups: gmane.emacs.gnus.general
To: Tommy Kelly <tommy.kelly@verilab.com>

Any ideas why doesn't it match on this:

("andreas-etc_to_me" "^From:.*linux-m68k.org\\(.\\|\n\\)*To:.*tommy.kelly@verilab.com")

thanks,
Tommy

P.S. I'am aware -- given your explanation concerning the action of ^ --
that it could also match in the obscure case where the "To: ..."
sequence wasn't anchored at the start of a line (e.g. if it was in a
Subject). But still, I don't see why I don't get a match despite that.





  But another
> problem with the regexp is that ^ is only special at the beginning of a
> (sub-)regexp (use "\n" to match newline in the middle).
>
>> For example, is there a way of "nesting" the split methods the way I
>> could do in a sieve script?
>
> Try out fancy splitting.
>
> Andreas.




  reply	other threads:[~2010-12-07 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06 19:02 Tommy Kelly
2010-12-06 21:13 ` Tommy Kelly
2010-12-06 23:08   ` Andreas Schwab
2010-12-07 19:38     ` Tommy Kelly [this message]
2010-12-07 20:49       ` Andreas Schwab
2010-12-07 21:36         ` Tommy Kelly
2010-12-08 18:13           ` Alberto Luaces

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zkshnzkz.fsf@verilab.com \
    --to=tommy.kelly@verilab.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).