On Fri, 24 May 2002, Michael Moncur wrote: > > That's not equivalent. Note the placement of the carat WRT the first > > alternation in the original rule. It should be: > > > > /(?:^\s*|\s+)\[?(?:ADV|cc)[:\]]/i > > Wouldn't \b work as a substitute for the (?:^\s*|\s+)? or am I confused?
Depends on whether the intent is to require actual whitespace between the \[?ADV and whatever preceded it. With \b it would match "word[ADV" as well as "word [ADV". On Sat, 25 May 2002, Tony L. Svanstrom wrote: > Unless there's a "less is more"-thinking, I'd like to suggest: > > header ADVERT_CODE Subject =~ /\bADV(ert|erti\w*?)?:/i > describe ADVERT_CODE Subject: contains advertising tag The colon at the end is supposed to be optional, right? And perhaps the intent was not merly to match the word "advertisement" but to actually require it to be either in brackets or followed by a colon. header ADVERT_CODE Subject =~ /\bADV(?:ert(?:i\w*?)?)?[]:]/i > Now please excuse me as I go find myself a life. You have a point. _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk