From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74840 Path: news.gmane.org!not-for-mail From: Tommy Kelly Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap-split-methods syntax Date: Tue, 07 Dec 2010 19:38:04 +0000 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1291750738 14282 80.91.229.12 (7 Dec 2010 19:38:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2010 19:38:58 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23196@lists.math.uh.edu Tue Dec 07 20:38:53 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQ3NE-0003cv-U0 for ding-account@gmane.org; Tue, 07 Dec 2010 20:38:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PQ3Mo-0005O1-4r; Tue, 07 Dec 2010 13:38:26 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PQ3Mm-0005Nn-UY for ding@lists.math.uh.edu; Tue, 07 Dec 2010 13:38:24 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PQ3Ml-0005K6-EH for ding@lists.math.uh.edu; Tue, 07 Dec 2010 13:38:24 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PQ3Mk-00073H-00 for ; Tue, 07 Dec 2010 20:38:22 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PQ3Mk-0003Pa-Jt for ding@gnus.org; Tue, 07 Dec 2010 20:38:22 +0100 Original-Received: from cpc2-john3-0-0-cust730.14-1.cable.virginmedia.com ([86.7.2.219]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Dec 2010 20:38:22 +0100 Original-Received: from tommy.kelly by cpc2-john3-0-0-cust730.14-1.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Dec 2010 20:38:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc2-john3-0-0-cust730.14-1.cable.virginmedia.com User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) Cancel-Lock: sha1:Wpa2MmMSOD7QLkARpzpJaTNRpWQ= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74840 Archived-At: Andreas Schwab writes: > Tommy Kelly 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 Subject: Re: nnimap-split-methods syntax Newsgroups: gmane.emacs.gnus.general To: Tommy Kelly 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.