From owner-freebsd-questions@FreeBSD.ORG Tue Sep 7 10:01:45 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B897B10656DC for ; Tue, 7 Sep 2010 10:01:45 +0000 (UTC) (envelope-from bernt@bah.homeip.net) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) by mx1.freebsd.org (Postfix) with ESMTP id 349D88FC08 for ; Tue, 7 Sep 2010 10:01:44 +0000 (UTC) Received: from kw.homeip.net (c80-217-68-0.bredband.comhem.se [80.217.68.0] (may be forged)) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id o87A1eOU029388; Tue, 7 Sep 2010 12:01:41 +0200 (CEST) (envelope-from bernt@bah.homeip.net) Message-ID: <4C860D84.6080502@bah.homeip.net> Date: Tue, 07 Sep 2010 12:01:40 +0200 From: Bernt Hansson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; sv-SE; rv:1.9.1.11) Gecko/20100817 Thunderbird/3.0.6 MIME-Version: 1.0 To: Drew Tomlinson References: <4C814262.5060504@mykitchentable.net> <4C814634.1000003@gmail.com> <4C8164C7.9000107@mykitchentable.net> <4C83C65B.6060508@mykitchentable.net> <20100905205910.GA82375@orange.esperance-linux.co.uk> <4c84216f.w2295Zjs25+GOe/F%perryh@pluto.rain.com> <4C852907.5000303@mykitchentable.net> In-Reply-To: <4C852907.5000303@mykitchentable.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: frank@shute.org.uk, perryh@pluto.rain.com, freebsd-questions@freebsd.org Subject: Re: Regex Help For Procmail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2010 10:01:45 -0000 2010-09-06 19:46, Drew Tomlinson skrev: > On 9/5/2010 4:02 PM, perryh@pluto.rain.com wrote: >> Frank Shute wrote: >> >>> Drew, try this: >>> >>> * ^From:.*famous-smoke\.com >>> >>> I think it's not catching it because the period isn't backslash >>> escaped ... >> Unless there's some edge case that I'm not thinking of, adding a >> backslash to escape a period will never convert a non-match into >> a match. An unescaped period in an RE matches any character, >> including a period. An escaped period matches only a period. > > I have confirmed this. I did add the backslash but procmail is still not > matching. > >> Adding the backslash _does_ better represent what the OP wants >> to accomplish, but the lack of it is not the cause of the RE not >> matching. (I'm not sufficiently familiar with how procmail uses >> REs to figure out what _is_ causing it not to match.) > > True and thus I'll leave the backslash. However I have no idea what _is_ > causing it not to match either. I'm stumped. I think it is the dash. Try to escape it like so: * ^From:.*famous\-smoke\.com > Thanks, > > Drew >