^((?!ca-ct.mydomain)(?!ca.mydomain)(?!cats.mydomain).)*mydomain.com$
I got the above expression from a web.config file, it's supposed to filter out anything that contains ca-ct.mydomain or ca.mydomain or cats.mydomain
I just cannot understand what the .)* piece means, the closing parenthesis between the dot and the asterisk seem to break the otherwise logical "any amount of characters after matching any of the 3 negative lookaheads" piece.