Create Rule that stops subdomain hotlinks but allows domains

My site is receiving loads of spammy backlinks by hotlinking to my images. I literally receive thousands of backlinks from these spammy domains.

One example is I have thousands of subdomains hotlinking to my images from

What I want to do is create a rule to stop all hotlinks from the subdomains of and any other culprit website, but I want to allow hotlinks from the main domain.

For example, in the case of, I want to allow hotlinking from but block hotlinking from a subdomain like

I need help with developing the Regex for this. Thanks, guys for your help in advance.