What you actually need is this, but unfortunatelly it’s not available in RouterOS.
Anyway, your regexp is too complicated and basically all wrong. Browse this thread for some helpful tips, make it work for single TLD first and then continue to expand it. And remember, it will only ever work for udp, only for other devices and not the router itself (unless you use another extremely ugly hack), so it won’t be good solution anyway. If you still communicate with support, you may tell them about the proposed solution (feature request) in first linked thread, maybe if more people ask about it, they will consider it.