On Mon, 2008-12-01 at 13:50 -0500, Ray Jette wrote: > I am trying to write a rule that gives negative scores to messages that > contain names of our company's and products. I have a few question > regarding this. Will the rule at the end of this message work?
No. Well, it's technically (almost) correct. ;) > Can I put line brakes in the rule? No, sorry. > How can I go about adding an optional s for \bBoiler\b? The ? means "optional". > body DEVISIONS_AND_PRODUCTS /\bAir > Balance\b|\bAirtherm\b|\bAlton\b|\bAmerican Warming\b| ... > ... |\bTemprite\b|\bTishken\b|\bTwinflo\b|\bVulcan\b|\bYoder\b/\i ^^ Since you want to match entire words or phrases only, with word boundaries before and after them always, doing it like this is much easier to read: /\b(Boilers?|Twinflo|Vulcan|Yoder)\b/i Also, this accepts both, Boiler and Boilers, because the s is optional due to the following '?'. If you want the RE to be case insensitive, please note that the i modifier must not be escaped. HTH guenther -- char *t="[EMAIL PROTECTED]"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}