Regular expresion to block all numeric TLD

I am trying to add a regular expression to the blocklist that would block access to all domains that are just numeric. Like or etc
I have this expression ^\ or ^[0-9] but when I try to add them I get a message about the domain not being valid. Is it not possible, or is my expression not formed correctly?

Once I find an expression that works, I would add other TLDs like .net or .org, etc.

Thanks for your replies!

That looks like the proper regex, but it needs to be entered as a regex, and not as a wildcard, since it is already in regex format:

This section of the Pi-Hole documentation has a nice tutorial on regex:

Including the exact regex you are looking for:

I used the add (exact) button (thinking it was already regex). That explains it. I’ll use the correct button, I suspect it will make all the difference!

Thanks for verifying the expression.

See the link above for a better expression.

This might be even better than the one posted above.

^[0-9][^a-z]+.[a-z]{2,7}$ would account for all possible TLDs, but would not include ANY subdomains
would match but not

[0-9][^a-z]+.[a-z]{2,7}$ would match any number of subdomains or

You could also include the use of the dash / hyphen - to match even more but I am not sure if the hyphen is a legal character in TLDs.