Crap. Typo /(?!(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 -----Original Message----- From: Tom Baker|Netsmith Inc [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2003 7:36 PM To: '[EMAIL PROTECTED]' Subject: [IMGate] Re: are we lazy as he says ? >>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)
