Hi,

On Fri, 17 Oct 2003 11:00:18 -0700 Robert Menschel <[EMAIL PROTECTED]> wrote:

> I manage three domains which are hosted on three different servers by the
> same hosting company, all of which use SpamAssassin. Last night, one of
> the servers was migrated from SA 2.55 to SA 2.60
> 
> I am using the same user_prefs file on all three systems.
> 
> > spamassassin --lint
> returns with no errors on the two 2.55 systems. However, starting with
> the migration to 2.60 on the third system, lint with the same user_prefs
> gives:
> 
> > Quantifier unexpected on zero-length expression before HERE mark in regex
> > m/free\b?of\b?charge << HERE / at (no file), rule RM_bp_FreeOfCharge, line 1.
> > Quantifier unexpected on zero-length expression before HERE mark in regex
> > m/free\b?of\b?charge << HERE / at (no file), rule RM_bp_FreeOfCharge, line 1.
> 
> The rule which this applies to seems to be:
> 
> > body     RM_bp_FreeOfCharge  /free\b?of\b?charge/i
> > describe RM_bp_FreeOfCharge  Body mentions something free of charge
> > score    RM_bp_FreeOfCharge  0.10

Do you mean /free\s?of\s?charge/i instead?

/b is a word boundary; like ^ and $, it's a "zero-width assertion",
looking for "a spot between two characters that has a "\w" on one
side of it and a "\W" on the other side of it" (from `perldoc perlre`)

'\b?' doesn't make sense with or without the '?' since 'e\bo' and 'f\bc'
are always false (e,o,f,c are all matched by \w so you have \w on both
sides of the \b...) Someone please correct me on this but it looks like
this regex is equivalent to /freeofcharge/i -- it looks like lint is
doing the right thing here.

You probably want

  /free\s+of\s+charge/i

or

  /free\s{0,10}of\s{0,10}charge/i  (similar to /free\s*of\s*charge/i)

The difference between /b and /s tripped me up for a long time because I
kept thinking 'blank' not 'boundary' when I saw '/b'.

hth,

-- 
Bob Apthorpe


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to