>>Do zero width tests work? >what? see http://www.perldoc.com/perl5.8.0/pod/perlre.html (about 3/4 way down)
"In other words, the two zero-width assertions next to each other work as though they're ANDed together" (ctrl+f on that quote to jump to the right spot in the page) (?=pattern) = zero width forward match (doesn't move the checkpoint) (?!pattern) = zero width forward negate match (doenst move the checkpoint) Think the DUNNO has the effect you are after, but this works also /(?!(smtp.*)|(biz))(?=(dhcp|user))\.*\.rr\.com/ 554 ACL Subscriber network Which reads If string does NOT contain smtp*|biz AND string DOES contain dhcp|user Followed by <any string>.rr.com Then reject 554 Typically any match moved the cursor/checkpoint to the right by the length of the matched string. To test without moving (zero length) you use the (?!pattern) Or (?=pattern)
