/[\s']((mountain.*clouds)|(clouds.*mountain))[\s',-]/i great, the above works on making "mountain" and "clouds" both true.
does the below differs from the above? /\bmountain\b|\bclouds\b/i thanks in advance. -----Original Message----- From: John Rudd [mailto:[EMAIL PROTECTED] Sent: Friday, November 24, 2006 9:33 PM To: vertito Cc: users@spamassassin.apache.org Subject: Re: getting "and" operator work vertito wrote: > header CF_BAD_SUBJ12 Subject =~ /[\s']mountain\|clouds[\s',-]/i > score CF_BAD_SUBJ12 8.0 > describe CF_BAD_SUBJ12 Drug spam > > with the above example, how do you make make a subject rule with the > words > > mountain > > AND (operator) > > clouds > > > in a way if both words exist in a subject line without case sensitive, > it will be tagged as spam with high score of 8. > > mountain\|clouds = does this mean, one of two words is true (OR operator) > makes a score of 8? > > how to do this with "AND" operator? > First of all, having the \ in there means you're not looking for "mountain" OR "clouds". It means you're looking for "mountain" followed by "|" followed by "clouds". The backslash makes the next character a literal instead of an operator. For AND, you want something like this: /[\s']((mountain.*clouds)|(clouds.*mountain))[\s',-]/i (or you may want something other than ".*" between the two instances)