Putting it into a few online regex testers, the double backslash (\) is causing the backslash to be interpreted literally, using single backslashes allows the . to be evaluated literally, but then the .* at the beginning means example.com itself doesn’t match.
Edit: The following appears to match both example.com and www.example.com, it was actually the first . that meant only subdomains would match, not the naked domain itself:
The example is fine if you expect a subdomain. As any number of any character (.) is matched there is no point in adding a match on the beginning (^*). You could even drop the former, this does the same:
It would have been so nice if MikroTik did it the same way as everyone else does. Simply let users say that example.comand everything under it should be forwarded to selected server or servers, for redundancy, without completely unnecessary regexps, let it play along with DoH, etc. I’m huge fan of RouterOS, but some of their decisions are really weird. Still, even current state is at least a step in the right direction. Hopefully it’s not the last one.
Static FWD entry does not work together with DoH. Yes, learned the hard way too. This MT DoH is indeed acting weird. It forwards all DNS requests to upstream DoH server, even if there exist static DNS entries locally in ROS. Most of my static entries do work, because my upstream DNS (nextdns) can’t resolve “home.arpa” domains. Really weird and I can’t see a reason why they are handling it so.