From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: Escaping carets? Date: Wed, 01 Oct 2003 03:30:30 +0200 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <8765jbo37w.fsf@lucien.dreaming> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1064972780 672 80.91.224.253 (1 Oct 2003 01:46:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2003 01:46:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 03:46:18 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A4W4H-0007ic-00 for ; Wed, 01 Oct 2003 03:46:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A4W3j-0000ol-05 for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2003 21:45:43 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!t-online.de!news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12909 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12909 bkhl@elektrubadur.se (Björn Lindström) writes: > I want something like this in my gnus-message-archive-group. I seem to > get something wrong concerning the caret in regexps however, since it > doesn't match my nnfolders as long as I include it. If I just use > "nnfolder:" instead it works, but it's not pretty. How do I escape that > caret so that it works? You shouldn't escape the caret -- I assume that your groups don't actually include a literal caret. What does string-match return when you insert the _full_ name of one of your nnfolder groups, e.g. (string-match "^nnfolder:" "nnfolder:foo.bar") > (if (string-match "^nnfolder:" group) > group > "outgoing") You need a pair of parens wrapped around that.