Impressive. You fully got the idea, and you are correct in what I need.
So now I am able to add "-abc.domain.com" to the blacklist, but it does not solve my problem
Just to confirm:
I need it to block "whatever dynamic name" is added in front of "-abc.domain.com", like "whatever-abc.domain.com" or "abc-abc.domain.com" or whatever text is put directly (!) in from of "-abc.domain.com" ...
Unfortunately, this is technically impossible due to the way how DNS works. This feature request came up very often in the discussion of blocking YouTube ads and a lot of research has been put into this. It would be possible with a major re-write of the DNS server software, but we don't have the manpower to support such an endeavor.
Well, some time has passed (almost an entire year) and in the meantime such a re-write actually happened (with the transition to FTLDNS)! I did some research on this over the last days and can now announce that I found the time to eventually implement GNU Extended Regular Expressions (as used by popular codes such as egrep (or grep -E ...), awk, and emacs). @Matt already posted the link.