Matt Kettler a écrit : > Ramprasad wrote: > >>Hi, >> I want to write a personal rule to match recipients of a particular >>domain >>The rule I am using now is >> >> header __TO_DOMAIN_NET ToCc =~ /[EMAIL PROTECTED]/i >> >>But the above rule would match "@domain.net" as well as >>"@domain.net.in" >>Which is the best way to match only @domain.net and not @domain.net.in >> >>Thanks >>Ram >> >> > > > Rather than \b for the end, try [\s\>], This will force a whitespace or > a > to be present there, not just any arbitrary word-boundary. > > ToCc =~ /[EMAIL PROTECTED]>]/i >
Does \s match the end of line (\n) in this context? Also, you can add ',' to cope with To: [EMAIL PROTECTED], [EMAIL PROTECTED] In any case, this should not be used to whitelist (or lower the score) as it would also match To: "<[EMAIL PROTECTED]>" <[EMAIL PROTECTED]>