Regular expresion to block all numeric TLD

Hello,
I am trying to add a regular expression to the blocklist that would block access to all domains that are just numeric. Like 1234567890.com or 1.com etc
I have this expression ^\d+.com or ^[0-9]+.com 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:

https://docs.pi-hole.net/ftldns/regex/tutorial/

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 12.com but not abc.12.com

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

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.