http://qs1969.pair.com?node_id=282343


in reply to Re: Match all emails from all subdomains for a domain except one..
in thread Match all emails from all subdomains for a domain except one..

Sorry, I guess I didn't make it clear enough, it also needs to fail on anything that isn't example.com. So, "jones@otherdomain.com" should fail.

  • Comment on Re: Re: Match all emails from all subdomains for a domain except one..

Replies are listed 'Best First'.
Re: Re: Re: Match all emails from all subdomains for a domain except one..
by bobn (Chaplain) on Aug 09, 2003 at 00:26 UTC

    Sorry, I guess I didn't make it clear enough,

    I'll say.... this is now beyond my RE skills...

    Why all in in one un-negated RE? Is this for a postfix rule or some-such?

    --Bob Niederman, http://bob-n.com
Re: Re: Re: Match all emails from all subdomains for a domain except one..
by hossman (Prior) on Aug 09, 2003 at 00:26 UTC
    ...it also needs to fail on anything that isn't example.com

    Then just move the parens a little bit, and make the specific subdomain optional...

    /@(?!bar\.)?example\.com$/

    Update: Oh well, that's why it's called "free advice"

      Testing would be good. Your change causes jones@foo.example.com, jones@bbar.example.com and jones@baz.example.com to fail.

      --Bob Niederman, http://bob-n.com